[WIP] Sideboarding: Considerations, Questions
OK, here I come, I'm starting to implement Sideboarding as a feature of Forge. I inspected some of the related code I might have to work with (in particular, the deck editor UI building elements, EditorTableView, CCurrentDeck/VCurrentDeck) etc. and I have a plan in mind, but I need some advice because it looks like at every step, I meet an obstacle in the form of inability to get different portions of the deck (e.g. the [main] part or the [sideboard] part of the deck). So:
The current idea is to add sideboarding as a feature of the deck editor (at least for Constructed) and then either fire it up between two duels of a match or use the two-listbox multiple choice window for the purposes of in-game sideboarding (in all modes). As for the deck editor, there are two possible strategies. One possibility is to add a button called "Main/Sideboard" to the current deck catalog on the right. Clicking that button will alternate the view between the main part of the deck and the sideboard. The downside may be the potential difficulty of how to move the card between the main and the sideboard, but that can be remedied with some sort of a shortcut or another button. The other possibility is to add a column to the current deck window on the right which will show if a card is in the main or in the sideboard, and add a button to switch between the two. Not sure which one is better, and not sure if maybe there's also a better idea out there.
Anyhow, for the implementation, there are several blockers mostly because I don't know how to do certain stuff in Forge yet:
1. I don't understand what I need to do if I need to reload a portion of a deck (e.g. the sideboard instead of the main, or vice-versa) into the Current Deck table (CCurrentDeck/VCurrentDeck). There seem to be no easy option to access different portions of the currently loaded deck from inside that method, so if, say, I add a button to VCurrentDeck and then implement something like:
2. I may not realize all the rules of sideboarding yet. What I know is (please correct if I'm wrong anywhere):
- In Constructed, the sideboard must consist of either 0 or 15 cards.
- In Draft and Sealed, the entire collection received from the boosters/etc. that did not go into the main is considered to be the sideboard.
- In Constructed, there may be no more than 4 cards of the same kind in the main and the sideboard together.
- In Draft and Sealed, as many cards as necessary may go into both the main and the sideboard.
What I don't fully realize (or at least doubt) is:
- In Sealed and Draft, do the basic lands count as sideboardable items? Can you sideboard in/out basic land?
- What do we do if, upon validation, the sideboard rules (e.g. in Constructed) are found out to be broken? Do we just not let the user save the deck until he corrects the deck?
- Are there any other peculiarities I have to be aware of when implementing sideboarding?
Any tips and tricks related to loading/saving parts of deck, especially from within the context of the deck editor, are highly welcome. The code is spread across several classes containing several dozen methods each, it's definitely not easy to go through it in search of a particular block of code which may potentially not even exist yet...
I'll try to implement this feature as quickly as I can, but I think I'll delay its merge (or at least enabling it for the final user) until after 1.3.3 in case I somehow manage to get it to work before 1.3.3, simply because it's a major enough change.
- Agetian
The current idea is to add sideboarding as a feature of the deck editor (at least for Constructed) and then either fire it up between two duels of a match or use the two-listbox multiple choice window for the purposes of in-game sideboarding (in all modes). As for the deck editor, there are two possible strategies. One possibility is to add a button called "Main/Sideboard" to the current deck catalog on the right. Clicking that button will alternate the view between the main part of the deck and the sideboard. The downside may be the potential difficulty of how to move the card between the main and the sideboard, but that can be remedied with some sort of a shortcut or another button. The other possibility is to add a column to the current deck window on the right which will show if a card is in the main or in the sideboard, and add a button to switch between the two. Not sure which one is better, and not sure if maybe there's also a better idea out there.
Anyhow, for the implementation, there are several blockers mostly because I don't know how to do certain stuff in Forge yet:
1. I don't understand what I need to do if I need to reload a portion of a deck (e.g. the sideboard instead of the main, or vice-versa) into the Current Deck table (CCurrentDeck/VCurrentDeck). There seem to be no easy option to access different portions of the currently loaded deck from inside that method, so if, say, I add a button to VCurrentDeck and then implement something like:
- Code: Select all
((FLabel) VCurrentDeck.SINGLETON_INSTANCE.getBtnSideboard()).setCommand(new Command() {
@Override public void execute() {
// ??? How do I reload a part of the deck here?
} });
2. I may not realize all the rules of sideboarding yet. What I know is (please correct if I'm wrong anywhere):
- In Constructed, the sideboard must consist of either 0 or 15 cards.
- In Draft and Sealed, the entire collection received from the boosters/etc. that did not go into the main is considered to be the sideboard.
- In Constructed, there may be no more than 4 cards of the same kind in the main and the sideboard together.
- In Draft and Sealed, as many cards as necessary may go into both the main and the sideboard.
What I don't fully realize (or at least doubt) is:
- In Sealed and Draft, do the basic lands count as sideboardable items? Can you sideboard in/out basic land?
- What do we do if, upon validation, the sideboard rules (e.g. in Constructed) are found out to be broken? Do we just not let the user save the deck until he corrects the deck?
- Are there any other peculiarities I have to be aware of when implementing sideboarding?
Any tips and tricks related to loading/saving parts of deck, especially from within the context of the deck editor, are highly welcome. The code is spread across several classes containing several dozen methods each, it's definitely not easy to go through it in search of a particular block of code which may potentially not even exist yet...
I'll try to implement this feature as quickly as I can, but I think I'll delay its merge (or at least enabling it for the final user) until after 1.3.3 in case I somehow manage to get it to work before 1.3.3, simply because it's a major enough change.
- Agetian