Merge pull request #359 from argonui/realityacid

Deckimporter: spawn reality acid reference dynamically
This commit is contained in:
BootleggerFinn 2023-08-26 16:18:26 -05:00 committed by GitHub
commit 2cff54f843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,7 @@
{
"id": "89005",
"type": "Story",
"class": "Neutral",
"permanent": true,
"cycle": "Standalone"
}

View File

@ -24,7 +24,7 @@
},
"Description": "",
"DragSelectable": true,
"GMNotes": "{\r\n \"id\": \"89005\",\r\n \"type\": \"Story\",\r\n \"cycle\": \"Standalone\"\r\n}\r",
"GMNotes_path": "AllPlayerCards.15bb07/RealityAcidReference.858b0a.gmnotes",
"GUID": "858b0a",
"Grid": true,
"GridProjection": false,

View File

@ -146,6 +146,7 @@ do
internal.maybeAddCustomizeUpgradeSheets(slots)
internal.maybeAddSummonedServitor(slots)
internal.maybeAddOnTheMend(slots, playerColor)
internal.maybeAddRealityAcidReference(slots)
local bondList = internal.extractBondedCards(slots)
internal.checkTaboos(deck.taboo_id, slots, playerColor)
@ -280,6 +281,15 @@ do
end
end
-- Process the card list looking for Reality Acid and adds the reference sheet when needed
---@param slots Table The slot list for cards in this deck. Table key is the cardId, value is the number
-- of those cards which will be spawned
internal.maybeAddRealityAcidReference = function(slots)
if slots["89004"] ~= nil then
slots["89005"] = 1
end
end
-- Process the slot list and looks for any cards which are bonded to those in the deck. Adds those cards to the slot list.
---@param slots Table The slot list for cards in this deck. Table key is the cardId, value is the number of those cards which will be spawned
internal.extractBondedCards = function(slots)