aeons-end-randomizer icon indicating copy to clipboard operation
aeons-end-randomizer copied to clipboard

Allow expedition config to control initial number of mages drawn

Open Quicksav opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Please describe. Sometimes when I run a 4 player expedition, i like everyone to have a choice of who they play, so I draw a few extra mages at random, I'd like to see this be a possible feature for the online randomizer as well.

Describe the solution you'd like Allow the initialbarracksconfig mageids type to accept a Array_1 type, meaning either a string that is the mageid, or a object with the random property to indicate a random mage

Then add handling to the convertExpeditionFromConfig that pulls mages randomly.

Additional context I'd also like to make sure that this pulls unique mages, and updates the mages for the expedition so that eventually adding random mages later can be updated to pull unique mages as well.

This might require a migration script, something I know almost nothing about, but understand the necessity of. I actually don't think it will be that difficult to migrate. If an initialbarracks config has a mageIds array, in theory that array is already set up in a way that is acceptable to the new system.

Quicksav avatar Oct 01 '20 05:10 Quicksav

I'd also like to make sure that this pulls unique mages, and updates the mages for the expedition so that eventually adding random mages later can be updated to pull unique mages as well.

Later random pulls during an expedition are checking the content which has already been added to the barracks anyway, if I remember correctly, so there shouldn't be an issue with duplicates. (the duplicates issue is another one :) )

I just skimmed over your code and recognized a few things - I will create a quick mini-review on the pull request. However this request does not take into account if your code works or anything. It's there so that you can make a few necessary adjustments. The real review will then follow asap :)

on3iro avatar Oct 01 '20 06:10 on3iro