X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fgames%2Funo.rb;h=df6a1eee1bf040b6f6f7c921ae298c05a56d07c1;hb=c4e7896a87d97988926d3b57f62599384c5c7189;hp=ab0ea161e44cd7885a7cbf800e3aa40874804524;hpb=12a508e1a75bc1de501f36ca9e4767f2349fe12e;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index ab0ea161..df6a1eee 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -515,7 +515,7 @@ class UnoGame announce _("%{lp}'s move was %{b}not%{b} legal, %{lp} must pick %{b}%{n}%{b} cards and play again!") % { :cp => cp, :lp => lp, :b => Bold, :n => @picker } - lp.cards << @discard # put the W+4 back in place + played = @discard # store the misplayed W+4 # reset the discard @color = @last_color.dup @@ -527,7 +527,10 @@ class UnoGame # force the player to play the current cards @must_play = lp.cards.dup + # but not the same (type of) card he misplayed, though + @must_play.delete(played) + lp.cards << played # reinstate the W+4 in the list of player cards # give him the penalty cards deal(lp, @picker) @picker = 0