Page 19 of 28

Re: Adding new cards with Groovy

PostPosted: 26 Feb 2014, 17:50
by jerichopumpkin
ShawnieBoy wrote:As the UI buttons can accept the mana symbols - maybe a symbol to represent payment of life. So Birthing Pod would have hints of: [ {G} :Search] [ {2Life} :Search] - Omitting the {1}, {T} and 'Sacrifice a creature' as they appear on both?
That seems a really good idea. What about using a grayed Phyrexian Mana symbol to represent {2Life}?

And it is possible to set the mana cost as text for the choices in the alternate cost options? This way we could represent the alternate cost (or costs) more accurately.

Re: Adding new cards with Groovy

PostPosted: 27 Feb 2014, 02:11
by melvin
Using the cost : effect syntax might be confusing if we don't give the full cost. Suggest removing the colon, so {G}Search and ImageSearch

Not sure if using the black Phyrexian mana would be be confusing... but lose of life is associated with black so that may be fine. Or we could use the same symbol as that on the card, eg ImageSearch

Re: Adding new cards with Groovy

PostPosted: 27 Feb 2014, 03:19
by ShawnieBoy
I think a separate icon entirely to represent loss of life would be better - Phyrexian mana of the same color could work, but could be confusing as Phyrexian mana itself represents a choice.

Re: Adding new cards with Groovy

PostPosted: 27 Feb 2014, 03:26
by melvin
Agree, a new icon that represent lose of 2 life would be even better

Re: Adding new cards with Groovy

PostPosted: 28 Feb 2014, 13:47
by ShawnieBoy
Just had a thought - this way of implementing Phyrexian mana will also work for colorless hybrid (Although with far more alt costs!) Flame Javelin, Beseech the Queen etc.

Re: Adding new cards with Groovy

PostPosted: 01 Mar 2014, 01:01
by melvin
ShawnieBoy wrote:Just had a thought - this way of implementing Phyrexian mana will also work for colorless hybrid (Although with far more alt costs!) Flame Javelin, Beseech the Queen etc.
Yes, in a way. To ensure CMC is computed correctly, the cost in the card script should be the colorless one, then use the color property to indicate the card's color. The alternate costs would replace the colorless cost with colored ones.

Re: Adding new cards with Groovy

PostPosted: 01 Mar 2014, 01:32
by ShawnieBoy
Wasn't there a CMC entry for card scripts? If so would that override the need to give it a purely colorless casting cost and go the opposite way, all colored first?

Re: Adding new cards with Groovy

PostPosted: 01 Mar 2014, 01:58
by melvin
There was, but it was removed in favor of getting it directly from the MagicManaCost object directly using getConvertedCost rather than tracking a separate number to reduce discrepancy between the two.

Re: Adding new cards with Groovy

PostPosted: 01 Mar 2014, 02:07
by ShawnieBoy
I understand - Just trying to see ways of {2/R} etc being recognised as {2} for getConvertedCost - Giving the colorless hybrids a colourless mana cost means they appear in the card lists/deck editor as colorless spells in regards to mana symbols.

Re: Adding new cards with Groovy

PostPosted: 01 Mar 2014, 02:17
by melvin
Good point, I didn't consider the deck list. Hmm, also in the hand the mana cost shown on the card would be completely colorless as well. This means for display to work correctly, we should put the colored cost for the cost property.

Re: Adding new cards with Groovy

PostPosted: 01 Mar 2014, 02:23
by melvin
Going with your approach, we can modify MagicCostManaType to return converted cost of a single cost symbol, then use this value in MagicManaCost.addType to compute converted mana cost of the whole mana cost. i.e. instead of
Code: Select all
MagicManaCost:83 convertedArr[0] += amount;
change it to
Code: Select all
MagicManaCost:83 convertedArr[0] += amount * type.getConvertedCost();

Re: Adding new cards with Groovy

PostPosted: 01 Mar 2014, 02:26
by ShawnieBoy
Yeah, that sounds perfect!

The only thing that's missing, is that the choice buttons don't render mana symbols - would be useful to have the alt cost names as the mana payment options, eg. [ {R} {R} {R} ] [ {2} {R} {R} ] [ {4} {R} ] [ {6} ]

And also then having the default name for alt cost as the casting cost :D That would also work for the Phyrexian mana as they are identified as the base color.


edit: sry, can't stop editing this post

Re: Adding new cards with Groovy

PostPosted: 01 Mar 2014, 03:26
by ShawnieBoy
Just had a freakout looking at Reaper King - possibly the biggest script ever? Can the choice window have a scroll-bar? lol

Re: Adding new cards with Groovy

PostPosted: 01 Mar 2014, 04:50
by ShawnieBoy
Image

Code: Select all
name=Reaper King
url=http://magiccards.info/shm/en/260.html
image=http://mtgimage.com/card/reaper%20king.jpg
value=4.162
rarity=R
type=Legendary,Artifact,Creature
subtype=Scarecrow
cost={2/W}{2/U}{2/B}{2/R}{2/G}
pt=6/6
ability=alt cost {2}{W}{U}{B}{R} named {2}{W}{U}{B}{R};\
        alt cost {2}{U}{B}{R}{G} named {2}{U}{B}{R}{G};\
        alt cost {2}{B}{R}{G}{W} named {2}{B}{R}{G}{W};\
        alt cost {2}{R}{G}{W}{U} named {2}{R}{G}{W}{U};\
        alt cost {2}{G}{W}{U}{B} named {2}{G}{W}{U}{B};\
        alt cost {4}{W}{U}{B} named {4}{W}{U}{B};\
        alt cost {4}{W}{B}{R} named {4}{W}{B}{R};\
        alt cost {4}{W}{B}{G} named {4}{W}{B}{G};\
        alt cost {4}{U}{B}{R} named {4}{U}{B}{R};\
        alt cost {4}{U}{R}{G} named {4}{U}{R}{G};\
        alt cost {4}{B}{R}{G} named {4}{B}{R}{G};\
        alt cost {4}{R}{G}{W} named {4}{R}{G}{W};\
        alt cost {4}{R}{W}{U} named {4}{R}{W}{U};\
        alt cost {4}{G}{W}{U} named {4}{G}{W}{U};\
        alt cost {4}{G}{U}{B} named {4}{G}{U}{B};\
        alt cost {6}{W}{U} named {6}{W}{U};\
        alt cost {6}{W}{B} named [6}{W}{B};\
        alt cost {6}{U}{B} named {6}{U}{B};\
        alt cost {6}{U}{R} named {6}{U}{R};\
        alt cost {6}{B}{R} named {6}{B}{R};\
        alt cost {6}{B}{G} named {6}{B}{G};\
        alt cost {6}{W}{R} named {6}{R}{W};\
        alt cost {6}{R}{G} named {6}{R}{G};\
        alt cost {6}{G}{W} named {6}{G}{W};\
        alt cost {6}{G}{U} named {6}{G}{U};\
        alt cost {8}{W} named {8}{W};\
        alt cost {8}{U} named {8}{U};\
        alt cost {8}{B} named {8}{B};\
        alt cost {8}{R} named {8}{R};\
        alt cost {8}{G} named {8}{G};\
        alt cost {10} named {10};\
        lord other Scarecrow creatures you control get +1/+1
timing=main
requires_groovy_code
Code: Select all
[
    new MagicWhenOtherComesIntoPlayTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
            return (otherPermanent != permanent &&
                    otherPermanent.isCreature() &&
                    otherPermanent.isFriend(permanent) &&
                    otherPermanent.hasSubType(MagicSubType.Scarecrow)) ?
                new MagicEvent(
                    permanent,
                    MagicTargetChoice.NEG_TARGET_PERMANENT,
                    MagicDestroyTargetPicker.Destroy,
                    this,
                    "Destroy target permanent\$."
                ) :
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPermanent(game, {
                final MagicPermanent permanent ->
                game.doAction(new MagicDestroyAction(permanent));
            });
        }
    }
]
I just couldn't resist - There's a UI challenge for you right there Lodici ;)

This is fairly unplayable due to the amount of alternate costs, unless you cast as {W} {U} {B} {R} {G}

Re: Adding new cards with Groovy

PostPosted: 01 Mar 2014, 05:24
by Lodici
ShawnieBoy wrote:I just couldn't resist - There's a UI challenge for you right there Lodici ;)

This is fairly unplayable due to the amount of alternate costs, unless you cast as {W} {U} {B} {R} {G}
If you could setup a test scenario with this card in Hand then I will take a look.