From 0a8f7dda97863bf0ad9ba2c2bcc9a1ad297dc2a4 Mon Sep 17 00:00:00 2001 From: Noah Date: Tue, 19 Mar 2024 00:39:45 -0400 Subject: [PATCH] Fix issue with Charlotte --- src/clj/game/cards/assets.clj | 24 ++++++++++++++---------- test/clj/game/cards/assets_test.clj | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/clj/game/cards/assets.clj b/src/clj/game/cards/assets.clj index a71f3b3d78..91fd115fd3 100644 --- a/src/clj/game/cards/assets.clj +++ b/src/clj/game/cards/assets.clj @@ -493,19 +493,23 @@ (defcard "Charlotte Caçador" (let [ability {:label "Gain 4 [Credits] and draw 1 card" - :optional {:once :per-turn - :prompt "Remove 1 hosted advancement counter to gain 4 [Credits] and draw 1 card?" - :req (req (pos? (get-counters card :advancement))) - :yes-ability {:msg "remove 1 hosted advancement counter from itself to gain 4 [Credits] and draw 1 card" - :async true - :effect (req - (add-prop state :corp card :advance-counter -1) - (wait-for - (gain-credits state side 4) - (draw state side eid 1)))}}} + :interactive (req true) + :optional + {:once :per-turn + :prompt "Remove 1 hosted advancement counter to gain 4 [Credits] and draw 1 card?" + :req (req (pos? (get-counters card :advancement))) + :yes-ability + {:msg "remove 1 hosted advancement counter from itself to gain 4 [Credits] and draw 1 card" + :async true + :effect (req + (add-prop state :corp card :advance-counter -1) + (wait-for + (gain-credits state side 4) + (draw state side eid 1)))}}} trash-ab {:cost [:advancement 1 :trash-can] :label "Gain 3 [Credits]" :msg (msg "gain 3 [Credits]") + :async true :effect (req (gain-credits state :corp eid 3))}] {:advanceable :always :flags {:corp-phase-12 (req true)} diff --git a/test/clj/game/cards/assets_test.clj b/test/clj/game/cards/assets_test.clj index 43c56ca539..5c6a6134cd 100644 --- a/test/clj/game/cards/assets_test.clj +++ b/test/clj/game/cards/assets_test.clj @@ -780,6 +780,24 @@ "Corp gaind 3 credits") (is (nil? (refresh cc)) "Charlotte Caçador got trashed")))) +(deftest charlotte-cacador-la-costa + (do-game + (new-game {:corp {:hand ["Charlotte Caçador" "La Costa Grid"] + :deck [(qty "Hedge Fund" 5)] + :credits 100}}) + (play-from-hand state :corp "Charlotte Caçador" "New remote") + (play-from-hand state :corp "La Costa Grid" "Server 1") + (let [cc (get-content state :remote1 0) + lcg (get-content state :remote1 1)] + (advance state cc 2) + (rez state :corp cc) + (rez state :corp lcg) + (take-credits state :corp) + (take-credits state :runner) + (is (:corp-phase-12 @state) "Corp has opportunity to use Charlotte Caçador") + (end-phase-12 state :corp) + (is (some #{"Charlotte Caçador" "La Costa Grid"} (mapv :title (prompt-buttons :corp))))))) + (deftest chekist-scion ;; Chekist Scion (do-game