diff options
-rw-r--r-- | data/rbot/plugins/games/uno.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index 4ea0ec35..92bf2b48 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -509,12 +509,19 @@ class UnoGame } return end + cards = 7 + if @start_time + cards = @players.inject(0) do |s, pl| + s +=pl.cards.length + end/@players.length + end p = Player.new(user) @players << p announce _("%{p} joins this game of %{uno}") % { :p => p, :uno => UNO } - deal(p, 7) + deal(p, cards) + return if @start_time if @join_timer @bot.timer.reschedule(@join_timer, 10) elsif @players.length > 1 |