Skip to content

Commit

Permalink
Fix up arena deck rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed May 13, 2018
1 parent 9d09df5 commit 5a12ecb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/views/ArenaEditor.js
Expand Up @@ -74,7 +74,7 @@ module.exports = connect(({user}) => ({user}))(class ArenaEditor extends React.C
}
etgutil.iterraw(props.user.pool, incrpool);
etgutil.iterraw(props.user.accountbound, incrpool);
pool[this.props.acard.code] = 0;
pool[this.props.acard.code] = 5;
let mark = 0,
deck = etgutil.decodedeck(props.adeck);
for (let i = deck.length - 1; i >= 0; i--) {
Expand All @@ -99,7 +99,9 @@ module.exports = connect(({user}) => ({user}))(class ArenaEditor extends React.C
setDeck = deck => {
deck.sort(Cards.codeCmp);
const cardMinus = Cards.filterDeck(deck, this.state.pool);
this.setState({cardMinus, deck});
const acode = this.props.acard.code;
cardMinus[acode] = 5;
this.setState({cardMinus, deck: deck.filter(x => x !== acode)});
}

render() {
Expand Down

0 comments on commit 5a12ecb

Please sign in to comment.