deck id fixes, import fix

This commit is contained in:
Chr1Z93 2024-02-06 22:36:30 +01:00
parent 067ca9d05e
commit ea7a119c22
4 changed files with 10 additions and 6 deletions

View File

@ -2,6 +2,7 @@
"id": "10079",
"type": "Asset",
"class": "Rogue",
"startsInPlay": true,
"level": 3,
"traits": "Talent. Trick.",
"permanent": true,

View File

@ -5,14 +5,14 @@
"z": 0
},
"Autoraise": true,
"CardID": 12100,
"CardID": 125100,
"ColorDiffuse": {
"b": 0.71324,
"g": 0.71324,
"r": 0.71324
},
"CustomDeck": {
"121": {
"1251": {
"BackIsHidden": true,
"BackURL": "https://i.imgur.com/EcbhVuh.jpg/",
"FaceURL": "http://cloud-3.steamusercontent.com/ugc/2279448008872128231/B3D4EF69ABE3736988B015629C5862F69EB42BDC/",

View File

@ -5,14 +5,14 @@
"z": 0
},
"Autoraise": true,
"CardID": 12100,
"CardID": 127100,
"ColorDiffuse": {
"b": 0.71324,
"g": 0.71324,
"r": 0.71324
},
"CustomDeck": {
"121": {
"1271": {
"BackIsHidden": true,
"BackURL": "http://cloud-3.steamusercontent.com/ugc/2279448008875867646/87E93B4F71674659B01C9ED280E573D7BD929882/",
"FaceURL": "http://cloud-3.steamusercontent.com/ugc/2279448008875867768/A54D29440DD5A9DA4E059B861C7AC22F5ACD9BE4/",

View File

@ -312,19 +312,22 @@ do
break
end
if instructor == "" or (instructor ~= "add:" and instructor ~= "remove:") then return end
if instructor == "" or (instructor ~= "add:" and instructor ~= "remove:") then break end
-- remove instructor from line
line = line:gsub(instructor, "")
-- evaluate instructions
local cardIds = {}
for str in line:gmatch("([^,]+)") do
if instructor == "add:" then
slots[str] = (slots[str] or 0) + 1
elseif instructor == "remove:" then
if slots[str] == nil then break end
slots[str] = math.max(slots[str] - 1, 0)
if slots[str] == 0 then
slots[str] = nil
end
end
end
end