Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by friarsol » 10 Sep 2011, 19:06
I'd rather just add a newcost than have incorrect functionality. It ismuch easier to create new costs than it used to be, but I can handle adding this cost soon if noone else is up for it
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by slapshot5 » 10 Sep 2011, 19:12
Ideally, AF_Mana should support Produced$ Any. It would work best for this situation and also clean up ability text for Black Lotus, Birds of Paradise, etc.ArsenalNut wrote:You have to setup it up as five different choices, look at Black Lotus for an example of five choices. Copper-Leaf Angel is another card that uses the sacrifice x cost mechanic.Iran wrote:Is possible to script Springjack Pasture? Anyone has some ideia how to script the last mana ability of it.
" Tap, Sacrifice X Goats: Add X mana of any one color to your mana pool. You gain X life. "
Thanks
I don't think there's a feature request Mantis issue out there for that. Perhaps I shall add one.
-slapshot5
Edit: Submitted as: http://cardforge.org/bugz/view.php?id=266
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by friarsol » 10 Sep 2011, 23:20
I'll have this up sometime tonight hopefully. Maybe tomorrow at the latest.friarsol wrote:I'd rather just add a newcost than have incorrect functionality. It ismuch easier to create new costs than it used to be, but I can handle adding this cost soon if noone else is up for it
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by ArsenalNut » 11 Sep 2011, 04:33
I was thinking about this same thing when I tried to script Fertile Ground.slapshot5 wrote:Ideally, AF_Mana should support Produced$ Any. It would work best for this situation and also clean up ability text for Black Lotus, Birds of Paradise, etc.ArsenalNut wrote:You have to setup it up as five different choices, look at Black Lotus for an example of five choices. Copper-Leaf Angel is another card that uses the sacrifice x cost mechanic.Iran wrote:Is possible to script Springjack Pasture? Anyone has some ideia how to script the last mana ability of it.
" Tap, Sacrifice X Goats: Add X mana of any one color to your mana pool. You gain X life. "
Thanks
I don't think there's a feature request Mantis issue out there for that. Perhaps I shall add one.
-slapshot5
Edit: Submitted as: http://cardforge.org/bugz/view.php?id=266
I took at quick look at this. My thought is to add support for "ChosenColor" to the AF Mana and use the AF ChooseColor to set the color. For example the ability lines for Black Lotus would look like
- Code: Select all
A:AB$ ChooseColor | Cost$ T Sac<1/CARDNAME> | Defined$ You | SubAbility$ DBMana | SpellDescription$ Add three mana of any one color to your mana pool.
SVar:DBMana:DB$ Mana | Cost$ 0 | Produced$ ChosenColor | Amount$ 3
The only question I have is it correct that the color choice occurs after resolution now? If not then this method won't work.
Last edited by ArsenalNut on 11 Sep 2011, 05:26, edited 2 times in total.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by ArsenalNut » 11 Sep 2011, 05:08
ArsenalNut wrote:I've got it working in terms adding the right color mana to the mana pool, but I need to work on the stack description.
The only question I have is it correct that the color choice occurs after resolution now? If not then this method won't work.

Edit: Just realized Static$ True only works for triggers. Back to the drawing board.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by friarsol » 11 Sep 2011, 12:41
Why not the way Slapshot was suggesting? The AI needs some more information no matter where you add the code, might as well have it be in AF_Mana.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by slapshot5 » 11 Sep 2011, 15:18
But if you want to fix up AF_Mana to support ChosenColor too, you could add things like Sol Grail and Quirion Elves... Just throwing it out there.friarsol wrote:Why not the way Slapshot was suggesting? The AI needs some more information no matter where you add the code, might as well have it be in AF_Mana.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by friarsol » 11 Sep 2011, 15:29
That's true. Chosen Color more fits the Sol Grail form (where the ChosenColor is saved) than the Birds of Paradise form.slapshot5 wrote:But if you want to fix up AF_Mana to support ChosenColor too, you could add things like Sol Grail and Quirion Elves... Just throwing it out there.friarsol wrote:Why not the way Slapshot was suggesting? The AI needs some more information no matter where you add the code, might as well have it be in AF_Mana.
-slapshot5
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by ArsenalNut » 11 Sep 2011, 16:18
Initially, I thought we could take advantage of an existing AF but it won't work right for mana abilitites without more changes outside the AF's. It's cleaner to add it directly to AF_Mana. I've already got a basic version working by re-using most of the color choice code from AF_Choose.friarsol wrote:That's true. Chosen Color more fits the Sol Grail form (where the ChosenColor is saved) than the Birds of Paradise form.slapshot5 wrote:But if you want to fix up AF_Mana to support ChosenColor too, you could add things like Sol Grail and Quirion Elves... Just throwing it out there.friarsol wrote:Why not the way Slapshot was suggesting? The AI needs some more information no matter where you add the code, might as well have it be in AF_Mana.
-slapshot5
The AI choice needs lots of work. The AF_Choose basically defaulted the AI choice to black. I've stuck with that for now with plans to change it to something a bit more sophisticated later. I haven't really looked at AI decision before. Any tips on where to start?
Adding support for ChosenColor shouldn't be a problem. I already had it working in my first experiment.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by Iran » 11 Sep 2011, 21:25
With the changes in AF_Animate, Is it possible to script cards like Turn To Frog and Ovinize?
We need a mechanism in script to deal with the part of "name a card" that cards like Cabal Therapy, Conundrum Sphinx, etc.. have.
We need a mechanism in script to deal with the part of "Players can't search libraries" that cards like Shadow of Doubt, Mindlock Orb, etc.. have.
Thanks
We need a mechanism in script to deal with the part of "name a card" that cards like Cabal Therapy, Conundrum Sphinx, etc.. have.
We need a mechanism in script to deal with the part of "Players can't search libraries" that cards like Shadow of Doubt, Mindlock Orb, etc.. have.
Thanks
Last edited by Iran on 12 Sep 2011, 18:57, edited 3 times in total.
Re: Card Development Questions
by ZzzzSleep » 12 Sep 2011, 13:02
Would you be able to give me an example when this is done? It'd be greatly appreciated.friarsol wrote:I'll have this up sometime tonight hopefully. Maybe tomorrow at the latest.friarsol wrote:I'd rather just add a newcost than have incorrect functionality. It ismuch easier to create new costs than it used to be, but I can handle adding this cost soon if noone else is up for it
Re: Card Development Questions
by ArsenalNut » 12 Sep 2011, 13:20
Look at Millikin. FriarSol checked in an updated version that uses the new mill cost. If you can't get the latest version, the mill cost syntax is "Mill<amount>".ZzzzSleep wrote:Would you be able to give me an example when this is done? It'd be greatly appreciated.friarsol wrote:I'll have this up sometime tonight hopefully. Maybe tomorrow at the latest.friarsol wrote:I'd rather just add a newcost than have incorrect functionality. It ismuch easier to create new costs than it used to be, but I can handle adding this cost soon if noone else is up for it
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by Iran » 12 Sep 2011, 19:49
I'm trying to script Selective Memory.
Looking in the script of the card Mana Severance I made this script.
Any suggestion to script correct this card?
Looking in the script of the card Mana Severance I made this script.
- Code: Select all
Name:Selective Memory
ManaCost:3 U
Types:Sorcery
Text:no text
A:SP$ ChangeZone | Cost$ 3 U | Origin$ Library | Destination$ Exile | ChangeType$ Creature,Artifact,Enchantment,Sorcery,Instant | ChangeNum$ XFetch | SpellDescription$ Search your library for any number of nonland cards and exile them. Then shuffle your library.
SVar:XFetch:Count$TypeInYourLibrary.nonLand
End
Any suggestion to script correct this card?
Last edited by Iran on 12 Sep 2011, 20:10, edited 1 time in total.
Re: Card Development Questions
by Sloth » 12 Sep 2011, 19:58
First: ChangeType$ has to be "Card.nonLand" (your version forgets Planeswalkers, but allows Artifact Lands and Dryad Arbor).Iran wrote:I'm trying to script Selective Memory.
Looking in the script of the card Mana Severance I made this script.But I think the SVar Count$TypeInYourLibrary don´t work, because the value of it is Zero.
- Code: Select all
Name:Selective Memory
ManaCost:3 U
Types:Sorcery
Text:no text
A:SP$ ChangeZone | Cost$ 1 U | Origin$ Library | Destination$ Exile | ChangeType$ Creature,Artifact,Enchantment,Sorcery,Instant | ChangeNum$ XFetch | SpellDescription$ Search your library for any number of nonland cards and exile them. Then shuffle your library.
SVar:XFetch:Count$TypeInYourLibrary.nonLand
End
Any suggestion to script correct this card?
Second: use "SVar:XFetch:Count$InYourLibrary". The number will be too high, but I'm pretty sure it won't matter since searching the library for specific (not any) cards is never mandatory.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by Iran » 12 Sep 2011, 20:04
I Test with "Card.nonLand" in ChangeType$ but it don't work, X is zero.Sloth wrote:First: ChangeType$ has to be "Card.nonLand" (your version forgets Planeswalkers, but allows Artifact Lands and Dryad Arbor).
Second: use "SVar:XFetch:Count$InYourLibrary". The number will be too high, but I'm pretty sure it won't matter since searching the library for specific (not any) cards is never mandatory.
Who is online
Users browsing this forum: No registered users and 39 guests