Card Contributions
by ubeefx
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
Re: Card Contributions
by muppet » 25 Feb 2015, 12:00
yes the graveyard parts all work not actually needed groovy yet but I guess that's how I have to get the mana to work. I'll actually read some documentation now I know a bit more what I'm doing.
Also I found getting a sane (non notepad/wordpad) text editor was a good plan as suggested earlier in thread.
Also I found getting a sane (non notepad/wordpad) text editor was a good plan as suggested earlier in thread.
Re: Card Contributions
by PalladiaMors » 26 Feb 2015, 18:06
Couple cards that didn't get pushed through Firemind:
- Code: Select all
name=Wall of Roots
image=http://mtgimage.com/card/wall%20of%20roots.jpg
value=2.500
rarity=C
type=Creature
subtype=Plant,Wall
cost={1}{G}
pt=0/5
ability=Defender;\
Put a -0/-1 counter on SN: Add {G} to your mana pool. Activate this ability only once each turn.
timing=main
oracle=Defender. Put a -0/-1 counter on Wall of Roots: Add {G} to your mana pool. Activate this ability only once each turn.
- Code: Select all
name=Abzan Kin-Guard
image=http://mtgimage.com/card/abzan%20kin-guard.jpg
value=2.500
rarity=U
type=Creature
subtype=Human,Warrior
cost={3}{G}
pt=3/3
ability=SN has lifelink as long as you control a white permanent.;\
SN has lifelink as long as you control a black permanent.
timing=main
oracle=Abzan Kin-Guard has lifelink as long as you control a white or black permanent.
- PalladiaMors
- Posts: 343
- Joined: 12 Jul 2014, 17:40
- Has thanked: 36 times
- Been thanked: 22 times
Re: Card Contributions
by muppet » 02 Mar 2015, 14:05
Time to try another wildly optimistic making a card Ashcloud Phoenix.
Ok as usual that seems to be too optimistic I got 2/3 working ok and I got return it to owners hand not battlefield working separately but if I try to add that as 3RD option it fails so its probably beyond me as usual. One day I'll get a card to work completely
.
Ok as usual that seems to be too optimistic I got 2/3 working ok and I got return it to owners hand not battlefield working separately but if I try to add that as 3RD option it fails so its probably beyond me as usual. One day I'll get a card to work completely

Re: Card Contributions
by ShawnieBoy » 02 Mar 2015, 22:55
I'm guessing you meant 'return to the battlefield face down instead of the graveyard'muppet wrote:Time to try another wildly optimistic making a card Ashcloud Phoenix.
Ok as usual that seems to be too optimistic I got 2/3 working ok and I got return it to owners hand not battlefield working separately but if I try to add that as 3RD option it fails so its probably beyond me as usual. One day I'll get a card to work completely.
Though I'm a bit rusty these days, this could be done with groovy although the timings involved would be tricky. It's not a replacement effect as it does hit the graveyard, and making sure it's face-down before the game notices too.
The turning face up trigger may (?) be purely scripted, but I'd have to check.
Showing what you've got so far would be helpful.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by muppet » 03 Mar 2015, 10:32
Sorry I'm just playing with cards really. Here is one I just don't understand so some light on this might help me make at least 1 card.
Zhur-Taa Druid. Ok so if I make it tap for green and deal one damage to me it works fine but as soon as I change to SN deals one damage to each opponent it fails even though this works on other cards.
So I am just confused.
Zhur-Taa Druid. Ok so if I make it tap for green and deal one damage to me it works fine but as soon as I change to SN deals one damage to each opponent it fails even though this works on other cards.
So I am just confused.
Re: Card Contributions
by ShawnieBoy » 03 Mar 2015, 23:13
That's ok, the best way to learn is to experimentmuppet wrote:Sorry I'm just playing with cards really. Here is one I just don't understand so some light on this might help me make at least 1 card.
Zhur-Taa Druid. Ok so if I make it tap for green and deal one damage to me it works fine but as soon as I change to SN deals one damage to each opponent it fails even though this works on other cards.
So I am just confused.

There's no simple way of adding new mana producing effects (for your second option). The reason that the '{T}: Add

That would explain why your other option didn't work.
As mana production is closely linked with the AI system, making abilities that can produce mana with a different activation than already included won't work, although they will parse ok. (The reason that the Wall of Roots above, hasn't been included, I would guess)
As for Zhur-Taa Druid, he's a bit more tricky again. His trigger isn't linked to his 'as text' mana ability. If he taps for mana from another ability (given to him by an Aura or other effect) the trigger will still activate. As yet, there's no clear way to check if a permanent has been tapped to produce mana to produce a trigger (Melvin may know different).
Sorry it's all bad news

-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by Huggybaby » 04 Mar 2015, 03:34
Ha, you don't sound too rusty to me ShawnieBoy. Welcome back. 

-
Huggybaby - Administrator
- Posts: 3226
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 742 times
- Been thanked: 601 times
Re: Card Contributions
by ShawnieBoy » 04 Mar 2015, 08:35
An area worth looking for new submissions would be instant and sorcery cards with multiple effects. Our current parser isn't good at noticing there's more than one, and so a simple tilde ~ will make the card work by linking them together.
Bear in mind that this will only work if the second effect doesn't have a target. I remember submitting a quick 'Bolster' instant when I first came back (Abzan Advantage), and expect there's others lurking in the latest block.
Bear in mind that this will only work if the second effect doesn't have a target. I remember submitting a quick 'Bolster' instant when I first came back (Abzan Advantage), and expect there's others lurking in the latest block.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by muppet » 04 Mar 2015, 08:36
Ok that explains Deathrite Shaman too, I am guessing that to add pretty much anything worthwhile I have to learn to use the groovy code. Ahh ok will look at those too.
Re: Card Contributions
by ShawnieBoy » 04 Mar 2015, 08:54
It's a bit of a known issue with the barrier to entry, while our natural language scripter was a great milestone for scripting cards automatically, it can make things more tricky to allow simple submissions.muppet wrote:Ok that explains Deathrite Shaman too, I am guessing that to add pretty much anything worthwhile I have to learn to use the groovy code. Ahh ok will look at those too.
The groovy code isn't quite as frightening as it looks (believe me, I was only submitting scripts before I even considered looking at groovy). There is some information on the wiki, but I really need to add some more (!!) to help make that first step.
Having a look at 'simple' cards with groovy and fiddling with them, or simply cutting and pasting relevant parts, can be a good first step. And if you're feeling more creative, don't limit yourself to trying existing cards, you can very easily create your own for testing.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by Lodici » 04 Mar 2015, 12:50
I have always thought that although very powerful, Groovy as-is is pretty difficult to learn if you just want to script cards. But the thing is that Groovy looks to be perfect for implementing a card scripting DSL so that instead of raw groovy a card scripter could use much simpler and intuitive syntax. Maybe something like the following examples...ShawnieBoy wrote:...It's a bit of a known issue with the barrier to entry, while our natural language scripter was a great milestone for scripting cards automatically, it can make things more tricky to allow simple submissions..
- Code: Select all
1. When Fanatic of Mogis enters the battlefield, it deals damage to each opponent equal to your devotion to red.
-> onEntersBattlefield.dealDamageEqualTo(your.devotionTo(MagicColor.RED)).toAllOf(your.opponents);
2. Buyback {3}. Fanning the Flames deals X damage to target creature or player.
-> .onBuyBack(3).dealDamageEqualToX().toOneOf(creature, player);
3. [Feral_Lightning] Put three 3/1 red Elemental creature tokens with haste onto the battlefield. Exile them at the beginning of the next end step.
-> .onPlayCard.put(3).tokens("3/1_red_Elemental_creature").withAbilities(MagicAbility.HASTE).to(MagicZone.BATTLEFIELD).then.on(NEXT_END_STEP).sendTo(MagicZone.EXILE)
At least, that's the idea anyway!

Re: Card Contributions
by ShawnieBoy » 04 Mar 2015, 17:12
That looks like a cool idea, as long as it doesn't then get incorporated into the scriptbuilder and then pushes the barrier even higher!
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by PalladiaMors » 10 Mar 2015, 17:55
This is my clumsy attempt at Thoughtcast:
- Code: Select all
def FOUR_OR_MORE_ARTIFACTS_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().getNrOfPermanents(MagicType.Artifact) >= 4;
}
};
def THREE_ARTIFACTS_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().getNrOfPermanents(MagicType.Artifact) == 3;
}
};
def TWO_ARTIFACTS_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().getNrOfPermanents(MagicType.Artifact) == 2;
}
};
def ONE_ARTIFACT_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().getNrOfPermanents(MagicType.Artifact) == 1;
}
};
[
new MagicCardActivation(
[FOUR_OR_MORE_ARTIFACTS_CONDITION, MagicCondition.CARD_CONDITION],
new MagicActivationHints(MagicTiming.Main, true),
"U"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return [new MagicPayManaCostEvent(source,"{U}")];
}
},
new MagicCardActivation(
[THREE_ARTIFACTS_CONDITION, MagicCondition.CARD_CONDITION],
new MagicActivationHints(MagicTiming.Main, true),
"1U"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return [new MagicPayManaCostEvent(source,"{1}{U}")];
}
},
new MagicCardActivation(
[TWO_ARTIFACTS_CONDITION, MagicCondition.CARD_CONDITION],
new MagicActivationHints(MagicTiming.Main, true),
"2U"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return [new MagicPayManaCostEvent(source,"{2}{U}")];
}
},
new MagicCardActivation(
[ONE_ARTIFACT_CONDITION, MagicCondition.CARD_CONDITION],
new MagicActivationHints(MagicTiming.Main, true),
"3U"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return [new MagicPayManaCostEvent(source,"{3}{U}")];
}
}
]
- PalladiaMors
- Posts: 343
- Joined: 12 Jul 2014, 17:40
- Has thanked: 36 times
- Been thanked: 22 times
Re: Card Contributions
by ShawnieBoy » 10 Mar 2015, 18:35
Hmm, looking at Avatar of Woe, it could be possible to string-build the cost. Off the top of my head:PalladiaMors wrote:This is my clumsy attempt at Thoughtcast:The problem here is that the player is getting to choose between the standard cost and the cost reduced by affinity, which shouldn't happen - he's forced to pay the later. In the Avatar cards (Avatar of Woe), Melvin managed to solve this problem for cards with two possible costs. I tried to do borrow that solution here, but didn't succeed. Is there a way to deal with this issue in this case? If not, would you guys be ok with doing affinity in this manner? From testing a little the AI doesn't pick the higher cost and I can't think of a reason for a human to take the higher cost either. I know it's definitely a bit clunky, so I'd like some directions here.
- Code: Select all
def FOUR_OR_MORE_ARTIFACTS_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().getNrOfPermanents(MagicType.Artifact) >= 4;
}
};
def THREE_ARTIFACTS_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().getNrOfPermanents(MagicType.Artifact) == 3;
}
};
def TWO_ARTIFACTS_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().getNrOfPermanents(MagicType.Artifact) == 2;
}
};
def ONE_ARTIFACT_CONDITION = new MagicCondition() {
public boolean accept(final MagicSource source) {
return source.getController().getNrOfPermanents(MagicType.Artifact) == 1;
}
};
[
new MagicCardActivation(
[FOUR_OR_MORE_ARTIFACTS_CONDITION, MagicCondition.CARD_CONDITION],
new MagicActivationHints(MagicTiming.Main, true),
"U"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return [new MagicPayManaCostEvent(source,"{U}")];
}
},
new MagicCardActivation(
[THREE_ARTIFACTS_CONDITION, MagicCondition.CARD_CONDITION],
new MagicActivationHints(MagicTiming.Main, true),
"1U"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return [new MagicPayManaCostEvent(source,"{1}{U}")];
}
},
new MagicCardActivation(
[TWO_ARTIFACTS_CONDITION, MagicCondition.CARD_CONDITION],
new MagicActivationHints(MagicTiming.Main, true),
"2U"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return [new MagicPayManaCostEvent(source,"{2}{U}")];
}
},
new MagicCardActivation(
[ONE_ARTIFACT_CONDITION, MagicCondition.CARD_CONDITION],
new MagicActivationHints(MagicTiming.Main, true),
"3U"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
return [new MagicPayManaCostEvent(source,"{3}{U}")];
}
}
]
- Code: Select all
[
new MagicCardActivation(
[MagicCondition.CARD_CONDITION],
new MagicActivationHints(MagicTiming.Main, true),
"Cast"
) {
@Override
public void change(final MagicCardDefinition cdef) {
cdef.setCardAct(this);
}
@Override
public Iterable<MagicEvent> getCostEvent(final MagicCard source) {
final MagicGame game = source.getGame();
final int n = game.filterPermanents(source.getController(),MagicTargetFilterFactory.ARTIFACT_YOU_CONTROL).size();
final int cost= Math.max(0,4-n)
return cost==0 ?
[new MagicPayManaCostEvent(source,"{U}")]:
[new MagicPayManaCostEvent(source,"{"+cost.toString()+"}{U}")];
}
}
]
Edit for real bad syntax.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by ShawnieBoy » 10 Mar 2015, 19:04
Good news is that it works
Worth testing it with AI, should be ok if it can manage Avatar of Woe.

-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Who is online
Users browsing this forum: No registered users and 6 guests