Concept, nothing here to run yet

fight-fixes
Bobloy 7 years ago
parent 0679d98185
commit 7d157c75e7

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

@ -0,0 +1,42 @@
The files included here include a "bleeding" area so that they can be printed and cut to a poker-sized deck.
Type: Poker sized blank cards
Dimensions: 63mm x 88mm, 2.5" x 3.5"
Number of cards to print:
Yes: 10
No: 10
Fascist policy: 11
Liberal policy: 6
Membership - Liberal: 6
Membership - Fascist: 4
Board liberal: 1
Board fascist 5-6p: 1
Board fascist 7-8p: 1
Board fascist 9-10p: 1
Role - Liberal 1: 2
Role - Liberal 2: 1
Role - Liberal 3: 1
Role - Liberal 4: 1
Role - Liberal 5: 1
Role - Hitler: 1
Role - Fascist 1: 2
Role - Fascist 2: 1
President: 1
Chancellor: 1
Previous president 1
Previous chancellor 1
Draw pile 1
Discard pile 1
Special rules 1
You can also make this game in a reduced 54 cards deck by removing the membership cards (and use the Yes-No cards instead) and combining some of the board aids and boards.
Game is by Max Temkin
https://www.kickstarter.com/projects/maxtemkin/secret-hitler/

@ -0,0 +1,5 @@
from .werewolf import Werewolf
def setup(bot):
bot.add_cog(Werewolf(bot))

@ -0,0 +1,114 @@
import asyncio
import discord
from discord.ext import commands
from redbot.core import Config
from datetime import datetime, timedelta
from werewolf.game import Game
class Werewolf:
"""
Base to host werewolf on a guild
"""
def __init__(self, bot):
self.bot = bot
self.config = Config.get_conf(self, identifier=87101114101119111108102, force_registration=True)
default_global = {}
default_guild = {
}
self.config.register_global(**default_global)
self.config.register_guild(**default_guild)
self.games = {} # Active games stored here, id is per guild
@commands.group()
async def ww(self, ctx: commands.Context):
"""
Base command for this cog. Check help for the commands list.
"""
if ctx.invoked_subcommand is None:
await ctx.send_help()
@ww.command()
async def new(self, ctx, game_code):
"""
Create and join a new game of Werewolf
"""
game = self._get_game(ctx.guild, game_code)
if not game:
await ctx.send("Failed to start a new game")
else:
await ctx.send("New game has started")
@ww.command()
async def join(self, ctx):
"""
Joins a game of Werewolf
"""
game = self._get_game(ctx.guild)
if not game:
await ctx.send("No game to join!\nCreate a new one with `[p]ww new`")
return
await game.join(ctx.author, ctx.channel)
@ww.command()
async def quit(self, ctx):
"""
Quit a game of Werewolf
"""
game = self._get_game(ctx.guild)
await game.quit(ctx.author, ctx.channel)
@ww.command()
async def start(self, ctx):
"""
Checks number of players and attempts to start the game
"""
game = self._get_game(ctx.guild)
if not game:
await ctx.send("No game running, cannot start")
await game.setup(ctx)
@ww.command()
async def vote(self, ctx, id):
"""
Vote for a player by ID
"""
game = self._get_game(ctx.guild)
if not game:
await ctx.send("No game running, cannot vote")
# Game handles response now
channel = ctx.channel
if channel is game.village_channel:
await game.vote(ctx.author, id, channel)
if channel in (c["channel"] for c in game.p_channels.values()):
await game.vote(ctx.author, id, channel)
def _get_game(self, guild, game_code=None):
if guild.id not in self.games:
if not game_code:
return None
self.games[guild.id] = Game(guild, game_code)
return self.games[guild.id]
async def _game_start(self, game):
await game.start()
Loading…
Cancel
Save