chrisgillis / slackwolf Goto Github PK
View Code? Open in Web Editor NEWA slack bot that moderates Werewolf games
A slack bot that moderates Werewolf games
Hey everyone,
If you want to play a game of werewolf or just want to help us test please join
https://werewolfgame.slack.com.
Post an email address you want to use here or send me an email at [email protected] and I'll send you an invite. Thanks!
Heya,
GameManager.php is missing a ; on line 509.
https://github.com/chrisgillis/slackwolf/blob/master/src/Game/Formatter/ChannelIdFormatter.php#L7
How often is a vertical tab (\x0B) returned from the Slack servers in a channel ID? I just set this up and the game channel ID happened to be CxxxxxGLB which was being matched by the trim and dropping the B.
Game seems to play fine with $trimmed = trim($userId, '<>#\t\n\r');
I can submit a PR but wanted to see what the story was first
I've got a pretty standard setup. MAMP pro/PHP 5.5.24 on OSX El Capitan.
Created blank bot and setup .env file with correct name/token.
Any ideas on how to debug this?
Running via Docker. The container will crash multiple times per day (during games), with no logs other than the "connecting" + "connected" message telling you that it has rebooted.
Game won't start without the Role of Seer.
How to replicate:
1 . !option role_seer off
2. !option game_mode chaos
Unsure if you want to implement roles from similar werewolves type games (such as Werewolves of Miller's Hollow - the village), but Cupid is a fun role to have in the game.
If in doubt, this are the rules of Cupid/Lovers:
Cupid wakes up during the setup night phase and chooses two people to become Lovers. Cupid returns to sleep Lovers wake up, learn who the other is, and are told each others roles.
For the Lovers to win, they need to be the only two left alive; otherwise they win with the village if the village wins. Lovers are unable to vote for each other, and they're not allowed to declare that they're Lovers (well, you can let them, but then they're easy pickings for the wolves).
If a Lover dies, the other Lover dies of heartbreak.
The Lycan is on the Villager team. They appear to the Seer as if they are a werewolf. This villager role makes the game harder for the villagers.
The hunter is on the Villager team. When the hunter dies, he may choose another play to die with him.
Occasionally will have issue where connection to slack is lost. Game state is lost upon restarting container or app
Hey there,
First of all: thanks a lot for creating this bot! This has been a lot of fun for my team.
I wanted to make a small feature suggestion: using Slack's rich message formatting. Using it could make the messages from the bot a bit easier to read. Here is a short demo using Slack's message formatting builder of how you could use this for the "Town Ballot" announcement (just an example, of course). I think it looks pretty good:
I'm totally unfamiliar with PHP so I'd have no idea where to start implementing this, so thought I'd see how you felt about it.
Right now the Slackwolf codebase is pretty light on the ease of development front. Near as I can tell, you basically have to have at least 2 other users to test just about any part of the application. Is there another way? I think a "getting started contributed" guide would be immensely helpful.
If there is no seer, the game starts immediately on Night 1 (essentially giving wolves a free kill)
Steps to replicate: create a new game with no seer.
Add an option to impose a time limit on Nights and Voting for specific games (in minutes).
e.g.
# set 60 minutes time limits
!option time_limit_night 60
!option time_limit_day 60
# to turn off
!option time_limit_night 0
!option time_limit_day 0
PHP Warning: Illegal string offset 'id' in vendor/coderstephen/slack-client/src/RealTimeClient.php on line 312
/usr/bin/php /Users/matthewroth/dev/projects/slackwolf/slackwolf/bot.php
Connecting...
Connected.
Slackwolf\Game\Command\NewCommand U49KL4LLF C8AAN37T3
Slackwolf\Game\Command\RemindCommand U49KL4LLF C8AAN37T3
Notice: Trying to get property of non-object in /Users/matthewroth/dev/projects/slackwolf/slackwolf/src/Game/Command/RemindCommand.php on line 42
Fatal error: Call to a member function getName() on null in /Users/matthewroth/dev/projects/slackwolf/slackwolf/src/Game/Command/RemindCommand.php on line 42
Process finished with exit code 255
Status command confirms if there is a bodyguard in the game. Hard to lie about it.
Add the ability to vote for noone such that the villagers don't have to lynch someone during the day if they dont want to.
What about role called something like Village Dunce, where there actions don't affect anything but they are told they are another role?
Or Actor role that is told is werewolf but whose kill votes don't count
They're always killing people the exact same way. Some randomized death text would be a fun, easy feature for new contributors.
If you use command !start all to start a game the bot is also brought into the game
Hi, this may just be something that I have overlooked, But I have my bot installed and typed !new, lobby started.
Three of us try to !join
I type !start
and keep getting the minimum of 3 players error. Is there something that I am missing?
installed via composer
We just played a round. On night 3 the body guard tried to save person 4. That night the only body guard died, yet somehow on night 4 person 4 was saved. It would appear that the save somehow persisted to the next night despite the death of the body guard.
Show players who are still alive
Vanilla means just werewolves and villagers, no special roles
I got an e-mail from a team trying to play:
We can not start a game. The log is Cannot start a game with less than 3 players.
.
We have six people in the slack channel.
What we have done is
!new
in #general
channel, and log is A new game lobby has been created. Type !join to play the next game.
!join
in channel!start
, then show the log Cannot start a game with less than 3 players.
It seems that the seer shouldn't have any information revealed to them until all the wolves have voted. Otherwise, the seer is able to leak information even if they are killed in the night.
Show dead players
The tanner is neither a villager or a werewolf. Does not know the werewolves. The tanner may only win if he is killed. The game ends as soon as the tanner is killed.
I can push the repo to heroku but can not get it running, any chance of a heroku deployment guide?
Witch: Kill or heal a player at night, once each per game. On the Villager team.
You'll need to modify !kill and create !heal
After playing a lot in Slack, it seems like it would be better if we moved more to a 'i want to start a new game, everyone !join it' rather than '!start @user1 @user2 @user3' or '!start' (rarely everyone is at keyboard)
I want to move to a system that looks more like this
Usage: !new
@me: !new Classic 6
@user1: !join
@Werewolf-Bot: Classic 6 players: @user1
@user2: !join
@Werewolf-Bot: Classic 6 players: @user1,@user2
@user3: !new Classic 4
@Werewolf-Bot: Lobby already in progress.
@me: !start
@Werewolf-Bot: Not enough players to start yet.
@me: !end
@Werewolf-Bot: Game cancelled.
Hi!
Absolutely loving the game!
We implemented it in our organisation and are having lots of fun with it.
We're not super tech-savvy (and we may play by different rules), so this may come across as an ignorant question, but we were wondering if the following was a bug or a feature:
We had a 5-way split vote, each with 1 vote. The result was that all 5 votees died.
This has also been seen with a 2-way split vote.
Was just wondering if bug or feature!
I've attached a screenshot for you below:
Thanks for providing an amazing bonding experience for our team :)
Villager. On the first night, the Beholder is shown the Seer.
I feel like Beholder is great for new groups in games of 7+, really helps get the players talking
When we type !start @player1 @player2 @player3
anyone who is in the list that joined the channel after the bot was started are not able to play.
The Sorcerer is a Seer, except on the Werewolf team.
If you try to set ebola option to 0 does not save value
I don't know how to get it. Is that webhook?
I can't seem to get it to work, they die normally and I can't find any logic in the game to say it would work.
no indication of success/failure either
Someone earlier in the development of Slackwolf introduced a weather command and added weather fluff to several descriptions in the game text.
However, it never changes. It's raining more than Seattle up in this village.
Hey, just trying out this project on OSX El Capitan.
I've got PHP v5.5.30, installed composer locally into the slackwolf folder, set up the .env
file with the right bot name and token.
It connects successfully:
Connecting...
Connected.
But after typing !help
in slack I get:
Slackwolf\Game\Command\HelpCommand U030LKBA7 C0H2WTUP2
Warning: Illegal offset type in /Users/hjwylde/git/chrisgillis/slackwolf/vendor/coderstephen/slack-client/src/RealTimeClient.php on line 202
Catchable fatal error: Argument 2 passed to Slack\ApiClient::send() must implement interface Slack\ChannelInterface, null given, called in /Users/hjwylde/git/chrisgillis/slackwolf/src/Game/Command/HelpCommand.php on line 29 and defined in /Users/hjwylde/git/chrisgillis/slackwolf/vendor/coderstephen/slack-client/src/ApiClient.php on line 337
The count would be passed along to the role strategy. OR should a RoleStrategy fit a certain number of people? I.e., Classic10, Classic15, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.