Skip to content

Commit 6f00dd0

Browse files
committed
Fix card importer for cost X cards.
1 parent d2a632b commit 6f00dd0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/tasks/cards.rake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ namespace :cards do
9292
faction_id: card["faction_id"],
9393
agenda_points: card["agenda_points"],
9494
base_link: card["base_link"],
95-
# TODO(plural): Ensure that any cards with cost X have that reflected properly.
96-
cost: card["cost"],
9795
deck_limit: card["deck_limit"],
9896
influence_cost: card["influence_cost"],
9997
influence_limit: card["influence_limit"],
@@ -109,6 +107,9 @@ namespace :cards do
109107
display_subtypes: flatten_subtypes(subtypes, card["subtypes"]),
110108
attribution: card["attribution"],
111109
)
110+
if card.key?("cost")
111+
new_card.cost = (card["cost"].nil? ? -1 : card["cost"])
112+
end
112113

113114
if new_card.card_type_id == 'agenda'
114115
new_card.advancement_requirement = (card["advancement_requirement"].nil? ? -1 : card["advancement_requirement"])

0 commit comments

Comments
 (0)