!card to for communism
This commit is contained in:
parent
59bcafe1f7
commit
929f54430d
1 changed files with 26 additions and 11 deletions
21
gameloop.py
21
gameloop.py
|
@ -716,9 +716,7 @@ def game(send, notice, voice, devoice, get_event):
|
||||||
notice(nick, 'Only the czar can choose now')
|
notice(nick, 'Only the czar can choose now')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if len(choices) != 1:
|
if len(choices) == 1:
|
||||||
notice(nick, 'Select one choice')
|
|
||||||
continue
|
|
||||||
choice = choices[0]
|
choice = choices[0]
|
||||||
|
|
||||||
if 0 <= choice < len(choosers):
|
if 0 <= choice < len(choosers):
|
||||||
|
@ -735,6 +733,23 @@ def game(send, notice, voice, devoice, get_event):
|
||||||
else:
|
else:
|
||||||
notice(nick, '%i not in range' % choice)
|
notice(nick, '%i not in range' % choice)
|
||||||
|
|
||||||
|
elif len(choices) == 0:
|
||||||
|
# Special case: award everyone a point
|
||||||
|
# and randomize czar
|
||||||
|
for player in card_choices:
|
||||||
|
player.points += 1
|
||||||
|
|
||||||
|
# If we set czar to None, setup_round()
|
||||||
|
# will handle ramdomizing it for us
|
||||||
|
czar = None
|
||||||
|
|
||||||
|
send('Everyone is a winner!')
|
||||||
|
|
||||||
|
break
|
||||||
|
|
||||||
|
else:
|
||||||
|
notice(nick, 'Select one or zero choices')
|
||||||
|
|
||||||
elif event == events.origins:
|
elif event == events.origins:
|
||||||
nick, = args
|
nick, = args
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue