diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-10-27 22:59:07 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-10-27 22:59:07 +0100 |
commit | ac5ab47320777b42104028f19383fdc6fc3aceb7 (patch) | |
tree | bd8185e4e45db52dee336403195c0c9c96f764bf /data/rbot/plugins | |
parent | a5f2eb0e77880ed5582ad39692349b31a50f9b4d (diff) |
UNO plugin: give cards to correct player at endgame
If the winner played a Reverse in response to a picker, the previous
player should pick the cards, and not the next one. This is not really
important at the moment because we score by giving points to the winner
instead of taking them from losers, but we fix it for correctness. It'll
be especially useful when we'll implement the other scoring too.
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r-- | data/rbot/plugins/games/uno.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index ea7ed18b..bb640125 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -761,7 +761,11 @@ class UnoGame } end if @picker > 0 and not halted - p = @players[1] + if @discard.value == 'Reverse' + p = @players.last + else + p = @players[1] + end announce _("%{p} has to pick %{b}%{n}%{b} cards!") % { :p => p, :n => @picker, :b => Bold } |