Skip to content

Commit

Permalink
Merge pull request #5521 from jwarwick/spent
Browse files Browse the repository at this point in the history
Capture credits spent for stats
  • Loading branch information
NoahTheDuke authored Feb 1, 2021
2 parents 1dd46db + 48ec93f commit 51e8ac2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/clj/game/core/costs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
state side (make-eid state eid)
(if (= side :corp) :corp-spent-credits :runner-spent-credits)
(value cost))
(swap! state update-in [:stats side :spent :credit] (fnil + 0) (value cost))
(complete-with-result state side eid {:msg (str "pays " (value cost) " [Credits]")
:type :credit
:value (value cost)})))
Expand Down Expand Up @@ -142,6 +143,7 @@
state side (make-eid state eid)
(if (= side :corp) :corp-spent-credits :runner-spent-credits)
cost)
(swap! state update-in [:stats side :spent :credit] (fnil + 0) cost)
(complete-with-result state side eid {:msg (str "pays " cost " [Credits]")
:type :x-credits
:value cost})))
Expand Down

0 comments on commit 51e8ac2

Please sign in to comment.