Subject: [kajongg/Applications/16.12] src: fix
blessingOfEarth



Git commit 9efb6099b9a6adff12f6a199c76110736ba9a14a by Wolfgang Rohdewald.
Committed on 13/12/2016 at 07:40.
Pushed by wrohdewald into branch 'Applications/16.12'.

fix blessingOfEarth

M +3 -1 src/player.py
M +0 -1 src/rulecode.py

https://commits.kde.org/kajongg/9efb6099b9a6adff12f6a199c76110736ba9a14a

diff --git a/src/player.py b/src/player.py
index e84f5db6..4ad4deec 100644
--- a/src/player.py
+++ b/src/player.py
@@ -509,7 +509,9 @@ class PlayingPlayer(Player):
PlayingPlayer.addConcealedTiles(
self,
[withDiscard]) # this should NOT invoke syncHandBoard
- if self.lastSource is not TileSource.RobbedKong:
+ if len(list(self.game.lastMoves(only=(Message.Discard, )))) == 1:
+ self.lastSource = TileSource.East14th
+ elif self.lastSource is not TileSource.RobbedKong:
self.lastSource = TileSource.LivingWallDiscard
# the last claimed meld is exposed
melds.remove(lastMeld)
diff --git a/src/rulecode.py b/src/rulecode.py
index 1ffc41da..0eca15fb 100644
--- a/src/rulecode.py
+++ b/src/rulecode.py
@@ -1327,7 +1327,6 @@ class BlessingOfEarth(RuleCode):
return False
if hand.ownWind is East:
return False
- assert hand.lastTile.isExposed, '{}: Blessing of Earth: last tile must
be exposed'.format(hand)
return True

def selectable(hand):


Programming list archiving by: Enterprise Git Hosting