forge
forge copied to clipboard
Adventure: check restrictedEditions and allowedEditions when generating rewards
Hi everyone,
when Forge Adventure generates a reward it doesn't check if the requested card(s) editions are permitted by restrictedEditions
/allowedEditions
, so if someone is building a new world that's initially cloned from the default one, it ends up with "forbidden" reward cards.
This PR simply ignores those editions, so for example if a reward is defined as:
{
"type": "card",
"probability": 1,
"count": 1,
"editions": [
"M22",
"M21"
],
"colors": [
"red"
],
"rarity": [
"rare"
]
}
but restrictedEditions
contains M21 and M22, the reward will be chosen among red rares of any non-forbidden edition.
Edition filtering should already be handled by initializeAllCards() in RewardData.java.
Edition filtering should already be handled by initializeAllCards() in RewardData.java.
Yes, sorry, I explained myself very poorly, I should've said that the reward filter would allow only "forbidden" cards, so the actual reward ends up empty
This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed
@jjayers99 Hello, I'm not sure if my explanation fell short again...? :sweat_smile:
This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed
Hoping it's not bad form, I'm just commenting to keep the PR alive