Re: Implementing new Ability Factories and Card Support Code
OK, I'm back to looking at the code to come up with the best strategy to implement the split cards. So far, here are the issues that have shown up and that probably need some discussion:
1) Split cards behave differently when on stack. In particular, their color and CMC should temporarily (as long as they're on stack, as far as I understand) be seen by all entities of the game as only those of the part currently cast. I thought of adding a special property to the spell abilities which comprise the split card, for example, something like "IsSplitCardSide$ True", which, if present, will signal the game that it should place the effect on stack with the color and CMC of the spell effect itself instead of the card as a whole. However, I'd need some advice on how exactly effects go on stack in Forge - say, the "Fire / Ice" card above is cast, and the player chooses to play the Ice effect. Where exactly in the code does it go on stack so that it appears in the stack list in the game? Can you please direct me to the right spot?
2) I have found a relatively high number of methods in the Card class and CardCharacteristics class that deal with the card color - namely, in addition to the simple getColor, there's also determineColor, in addition to setColor there's also addColor. Am I correct that all of these methods will have to be changed to account for the split card mechanics? In that case, I think that whether they take information from the basic card information or from the individual spell effects will depend on the presence of the SplitCard SVar or whatever other form will exist that will flag the card as a split card.
3) For CMC, it's probably going to be best to implement it as a part of the xCount function with CardManaCost, as described by Sol above. Would this be an acceptable route?
With all three points above considered together, I'm not sure if we'll actually need the IsSplitCardSide property to determine which spell effects comprise the sides of the split card (I mean, as long as SplitCard SVar is present, maybe it can just automatically consider all SP$ lines as parts of the split card, or is it dangerous to choose this route?)
- Agetian
1) Split cards behave differently when on stack. In particular, their color and CMC should temporarily (as long as they're on stack, as far as I understand) be seen by all entities of the game as only those of the part currently cast. I thought of adding a special property to the spell abilities which comprise the split card, for example, something like "IsSplitCardSide$ True", which, if present, will signal the game that it should place the effect on stack with the color and CMC of the spell effect itself instead of the card as a whole. However, I'd need some advice on how exactly effects go on stack in Forge - say, the "Fire / Ice" card above is cast, and the player chooses to play the Ice effect. Where exactly in the code does it go on stack so that it appears in the stack list in the game? Can you please direct me to the right spot?
2) I have found a relatively high number of methods in the Card class and CardCharacteristics class that deal with the card color - namely, in addition to the simple getColor, there's also determineColor, in addition to setColor there's also addColor. Am I correct that all of these methods will have to be changed to account for the split card mechanics? In that case, I think that whether they take information from the basic card information or from the individual spell effects will depend on the presence of the SplitCard SVar or whatever other form will exist that will flag the card as a split card.
3) For CMC, it's probably going to be best to implement it as a part of the xCount function with CardManaCost, as described by Sol above. Would this be an acceptable route?
With all three points above considered together, I'm not sure if we'll actually need the IsSplitCardSide property to determine which spell effects comprise the sides of the split card (I mean, as long as SplitCard SVar is present, maybe it can just automatically consider all SP$ lines as parts of the split card, or is it dangerous to choose this route?)
- Agetian