Re: [WIP] Split Cards Support
I can do it for you with the reference client. I'm merging trunk into my own branch without trouble right now.
High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=52&t=9654
Agetian wrote:@ Chris: Yeah, basically it's too far into coding already to be lost. I can try merging one revision by one though, see how that goes.
- Agetian
Name:Assault
ManaCost:R
AlternateMode: Split
Types:Sorcery
A:SP$ DealDamage | Cost$ R | NumDmg$ 2 | ValidTgts$ Creature,Player | SpellDescription$ Assault deals 2 damage to target creature or player.
SetInfo:INV Uncommon
SetInfo:TSB Uncommon
SetInfo:HOP Uncommon
Oracle:Assault deals 2 damage to target creature or player.
ALTERNATE
Name:Battery
ManaCost:3 G
Types:Sorcery
A:SP$ Token | Cost$ 3 G | TokenAmount$ 1 | TokenName$ Elephant| TokenTypes$ Creature,Elephant| TokenOwner$ You | TokenColors$ Green | TokenPower$ 3 | TokenToughness$ 3 | TokenImage$ g 3 3 elephant | SpellDescription$ Put a 3/3 green Elephant creature token onto the battlefield.
Oracle:Put a 3/3 green Elephant creature token onto the battlefield.
End
Thanks, Max! That'll come in handy! I've added it to the SplitCards branch.Max mtg wrote:The assault//battery script (with new setinfo):
...
The most important functions are hasProperty in the card class (should behave according to 708.6.) and xCount in CardFactoryUtil when the parameter contains "CardManaCost" (should return the sum of the cmc's).Agetian wrote:Also, the bigger part of the problem is that I'm not sure how exactly to understand which calls should be jury-rigged to get more than one response and which ones shouldn't... can you please tell me how I should determine which calls to getCMC should actually be able to produce different responses for split cards?
The common examples are: Dark Confidant (uses xCount) and Isochron Scepter (uses hasProperty).Agetian wrote:@ Sloth: Thanks for the info! Do you know what would be the easiest test case to check both of the cases you've mentioned? (what cards should be played etc. to see that the functions work as desired)
IIRC, any card that uses cmc<comparator><compare to> property in the targeting uses getCMC in Card.java from hasProperty (eg: Spell Snare uses cmcEQ2). Counterspells with that restriction can be used to test the card on the stack and changeZone ones will test it in other zones.Agetian wrote:Do you know what would be the easiest test case to check both of the cases you've mentioned? (what cards should be played etc. to see that the functions work as desired)