added upper limit for bonded cards
This commit is contained in:
parent
c9b8ae3a51
commit
7aadd2adf0
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10063"
|
||||
}
|
||||
],
|
||||
|
@ -8,6 +8,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10134"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 2,
|
||||
"id": "06025"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "06113"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "06113"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "06113"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "06113"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "06277"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 2,
|
||||
"id": "10036"
|
||||
}
|
||||
],
|
||||
|
@ -7,10 +7,12 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10006"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10007"
|
||||
}
|
||||
],
|
||||
|
@ -8,6 +8,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "06015a"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 3,
|
||||
"maxCount": 3,
|
||||
"id": "05314"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 3,
|
||||
"maxCount": 3,
|
||||
"id": "05314"
|
||||
}
|
||||
],
|
||||
|
@ -6,10 +6,12 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10015-b1"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10015-b2"
|
||||
}
|
||||
],
|
||||
|
@ -7,6 +7,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 2,
|
||||
"id": "10039"
|
||||
}
|
||||
],
|
||||
|
@ -9,14 +9,17 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "06031"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "06032"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "06033"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 3,
|
||||
"maxCount": 3,
|
||||
"id": "06331"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 3,
|
||||
"maxCount": 3,
|
||||
"id": "05317"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 3,
|
||||
"maxCount": 3,
|
||||
"id": "05317"
|
||||
}
|
||||
],
|
||||
|
@ -8,6 +8,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10045"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10045"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10045"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10045"
|
||||
}
|
||||
],
|
||||
|
@ -9,22 +9,27 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10086"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10087"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10088"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10089"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10090"
|
||||
}
|
||||
],
|
||||
|
@ -9,22 +9,27 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10086"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10087"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10088"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10089"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10090"
|
||||
}
|
||||
],
|
||||
|
@ -8,10 +8,12 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10106"
|
||||
},
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "10107"
|
||||
}
|
||||
],
|
||||
|
@ -8,6 +8,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 1,
|
||||
"id": "06022"
|
||||
}
|
||||
],
|
||||
|
@ -8,6 +8,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 2,
|
||||
"id": "06028"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 1,
|
||||
"maxCount": 2,
|
||||
"id": "06283"
|
||||
}
|
||||
],
|
||||
|
@ -9,6 +9,7 @@
|
||||
"bonded": [
|
||||
{
|
||||
"count": 3,
|
||||
"maxCount": 3,
|
||||
"id": "06019"
|
||||
}
|
||||
],
|
||||
|
@ -363,21 +363,23 @@ do
|
||||
local bondedList = { }
|
||||
for cardId, cardCount in pairs(slots) do
|
||||
local card = allCardsBagApi.getCardById(cardId)
|
||||
if (card ~= nil and card.metadata.bonded ~= nil) then
|
||||
if card ~= nil and card.metadata.bonded ~= nil then
|
||||
for _, bond in ipairs(card.metadata.bonded) do
|
||||
-- add a bonded card for each copy of the parent card (except for Pendant of the Queen)
|
||||
if bond.id == "06022" then
|
||||
bondedCards[bond.id] = bond.count
|
||||
else
|
||||
bondedCards[bond.id] = bond.count * cardCount
|
||||
end
|
||||
-- 'unlimited' upper limit for cards without this data
|
||||
local maxCount = bond.maxCount or 99
|
||||
|
||||
-- add a bonded card for each copy of the parent card (until the max value is reached)
|
||||
bondedCards[bond.id] = math.min(bond.count * cardCount, maxCount)
|
||||
|
||||
-- We need to know which cards are bonded to determine their position, remember them
|
||||
bondedList[bond.id] = true
|
||||
|
||||
-- Also adding taboo versions of bonded cards to the list
|
||||
bondedList[bond.id .. "-t"] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Add any bonded cards to the main slots list
|
||||
for bondedId, bondedCount in pairs(bondedCards) do
|
||||
slots[bondedId] = bondedCount
|
||||
|
Loading…
Reference in New Issue
Block a user