diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-12-09 11:32:49 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-12-09 11:32:49 +0100 |
commit | 4ff3c5d894c9b6b375b69d5fe9506a0a73e33871 (patch) | |
tree | 028597d045b945dbe12aa82c4eb40895de915dc5 /data | |
parent | 539685183e46a9fe7f0d334688b8760a99e3d169 (diff) |
UNO!: prevent joins after a challengeable card
If someone joins after a challengeable W+4, he would be inserted between
the last and first player, and if there is a challenge _his_ cards would
be exposed. So prevent joining in such a situation.
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/games/uno.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index 6b50d03e..c689c253 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -689,6 +689,13 @@ class UnoGame return end end + if @last_discard + announce _("you can't join now, %{p}, a %{card} was just played, wait until next turn") % { + :card => @discard, + :p => user + } + return + end cards = 7 if @start_time cards = (@players.inject(0) do |s, pl| |