From df5823f4a53c8eff43cd4b8da4065a8cf643dffc Mon Sep 17 00:00:00 2001 From: Alexander Zeier Date: Sat, 1 Oct 2016 17:25:56 +0200 Subject: [PATCH] Show cards discarded from hand Closes #125. --- CHANGELOG.md | 1 + ts/components/game/Player.tsx | 2 +- ts/state/GameStateTracker.ts | 4 ++++ ts/state/mutators/TagChangeMutator.ts | 9 ++++++++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d440eaf9..f8e3c926 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Show C'Thun as a minion during ritual (#137, @azeier) - Highlight Hero Power when it's played (#140, @azeier) - Show cards discarded from the deck (#141, @azeier) +- Show cards discarded from the hand (#125, @azeier) ### Changed - Update dependencies diff --git a/ts/components/game/Player.tsx b/ts/components/game/Player.tsx index 8c176533..6e37e2de 100644 --- a/ts/components/game/Player.tsx +++ b/ts/components/game/Player.tsx @@ -50,7 +50,7 @@ export default class Player extends React.Component { if (this.props.diffs && this.props.diffs.count() > 0) { this.props.diffs.forEach(diff => { - if (diff.tag === GameTag.ZONE && diff.current === Zone.GRAVEYARD && diff.previous === Zone.DECK) { + if (diff.tag === GameTag.ZONE && diff.current === Zone.GRAVEYARD && (diff.previous === Zone.DECK || diff.previous === Zone.HAND)) { let entity = this.props.entities.get(Zone.GRAVEYARD).get(diff.entity); if (entity) { action =