forge icon indicating copy to clipboard operation
forge copied to clipboard

Adventure: check restrictedEditions and allowedEditions when generating rewards

Open Jorilx opened this issue 7 months ago • 7 comments

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.

Jorilx avatar Jan 21 '24 10:01 Jorilx

Edition filtering should already be handled by initializeAllCards() in RewardData.java.

jjayers99 avatar Feb 04 '24 00:02 jjayers99

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

Jorilx avatar Feb 05 '24 08:02 Jorilx

This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed

github-actions[bot] avatar Mar 21 '24 09:03 github-actions[bot]

@jjayers99 Hello, I'm not sure if my explanation fell short again...? :sweat_smile:

Jorilx avatar Mar 21 '24 09:03 Jorilx

This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed

github-actions[bot] avatar May 06 '24 09:05 github-actions[bot]

Hoping it's not bad form, I'm just commenting to keep the PR alive

Jorilx avatar May 06 '24 09:05 Jorilx