From d1be624e9a212c7720859424ad27d2740a1a51ec Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 24 Sep 2024 18:56:37 +1200 Subject: [PATCH 1/3] fixed basic action logging --- src/clj/game/cards/basic.clj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/clj/game/cards/basic.clj b/src/clj/game/cards/basic.clj index 9a5c083adf..cdb237df66 100644 --- a/src/clj/game/cards/basic.clj +++ b/src/clj/game/cards/basic.clj @@ -103,7 +103,7 @@ :async true :req (req tagged) :prompt "Choose a resource to trash" - :msg (msg "trash " (:title (:card context))) + :msg (msg "trash " (:title target)) ;; I hate that we need to modify the basic action card like this, but I don't think there's any way around it -nbkelly, '24 :choices {:req (req (and (if (and (->> (all-active-installed state :runner) (filter (fn [c] (untrashable-while-resources? c))) @@ -124,7 +124,8 @@ :effect (req (let [additional-costs (merge-costs (get-effects state side :basic-ability-additional-trash-cost target)) cost-strs (build-cost-string additional-costs) - can-pay (can-pay? state side (make-eid state (assoc eid :additional-costs additional-costs)) target (:title target) additional-costs)] + can-pay (can-pay? state side (make-eid state (assoc eid :additional-costs additional-costs)) target (:title target) additional-costs) + target-card target] (if (empty? additional-costs) (trash state side eid target nil) (wait-for (resolve-ability @@ -143,7 +144,7 @@ nil additional-costs) (system-msg state side (str (:msg async-result) " as an additional cost to trash " (:title target))) (complete-with-result state side eid target))))} - card nil) + card targets) (if async-result (trash state side eid target nil) (effect-completed state side eid))))))} From 04f87ec0818d97dfc9c5531394ecf3237870e0ae Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 24 Sep 2024 18:56:51 +1200 Subject: [PATCH 2/3] test that card is logged --- test/clj/game/cards/basic_test.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/test/clj/game/cards/basic_test.clj b/test/clj/game/cards/basic_test.clj index ec69ceea8c..f090c0cea0 100644 --- a/test/clj/game/cards/basic_test.clj +++ b/test/clj/game/cards/basic_test.clj @@ -84,6 +84,7 @@ (gain-tags state :runner 1) (trash-resource state) (click-card state :corp fs) + (is (last-log-contains? state "to trash Fan Site") "Logged correctly") (is (= 1 (count (:discard (get-runner)))) "Fan Site got trashed")))) (deftest corp-basic-actions-purge From 0e800adcd0be66f4bda88e3f302f03b53fe3375f Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 24 Sep 2024 18:58:48 +1200 Subject: [PATCH 3/3] cleanup --- src/clj/game/cards/basic.clj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/clj/game/cards/basic.clj b/src/clj/game/cards/basic.clj index cdb237df66..9abf310ab3 100644 --- a/src/clj/game/cards/basic.clj +++ b/src/clj/game/cards/basic.clj @@ -124,8 +124,7 @@ :effect (req (let [additional-costs (merge-costs (get-effects state side :basic-ability-additional-trash-cost target)) cost-strs (build-cost-string additional-costs) - can-pay (can-pay? state side (make-eid state (assoc eid :additional-costs additional-costs)) target (:title target) additional-costs) - target-card target] + can-pay (can-pay? state side (make-eid state (assoc eid :additional-costs additional-costs)) target (:title target) additional-costs)] (if (empty? additional-costs) (trash state side eid target nil) (wait-for (resolve-ability