Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can download Hearthdash from the [releases](https://github.com/postcasio/hea
### Requirements

* OS X, Windows
* nodejs v0.10
* nodejs v0.12
* coffee-script
* protobuf

Expand All @@ -34,10 +34,18 @@ Homebrew is the best way to install Node and protobufs on OS X:

### Building

cd tools
npm install
cd capture
npm install
cd ../tools
npm install
coffee build.coffee --card-xml-path=<path>

Where `path` is the path to the `cardxml0.unity3d` file in the Hearthstone Data directory.
Where `path` is the path to the `cardxml0.unity3d` file in the Hearthstone Data directory. If you don't set this paramater, default value is /Applications/Hearthstone/Data/OSX/cardxml0.unity3d

Hearthdash should now be in the `build` directory.

You probably need run with sudo to make sure it can capture network packs.

sudo build/Hearthdash.app/Contents/MacOS/Atom

2 changes: 1 addition & 1 deletion capture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"cap": "0.0.10",
"cap": "0.0.15",
"minimist": "^1.1.0",
"node-protobuf": "^1.2.1"
}
Expand Down
1 change: 1 addition & 0 deletions src/app/game-manager.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ module.exports = class GameManager
size = @gameView.opponentHandView.addCard entity.name

onCreateGame: (message) ->
@reset()#need call this, otherwise the entities is null

getEntity: (entity, update=true) ->
if @entities[entity.id]
Expand Down
10 changes: 5 additions & 5 deletions tools/extract-card-data.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ xml2js.parseString cards, (err, result) ->
id: card.$.CardID

for tag in card.Tag
switch tag.$.name
when 'CardName'
switch tag.$.enumID
when '185'
data.name = tag._
when 'CardTextInHand'
data.text = tag.$.value
when '184'
data.text = tag._
else
data[tag.$.name.toLowerCase()] = tag.$.value
data[tag.$.enumID] = tag.$.value

cardData[data.id] = data

Expand Down