Page 56 of 141

Re: Card Development Questions

PostPosted: 10 Sep 2011, 19:06
by friarsol
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

PostPosted: 10 Sep 2011, 19:12
by slapshot5
ArsenalNut wrote:
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
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.
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.

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

Re: Card Development Questions

PostPosted: 10 Sep 2011, 23:20
by friarsol
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
I'll have this up sometime tonight hopefully. Maybe tomorrow at the latest.

Re: Card Development Questions

PostPosted: 11 Sep 2011, 04:33
by ArsenalNut
slapshot5 wrote:
ArsenalNut wrote:
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
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.
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.

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 was thinking about this same thing when I tried to script Fertile Ground.

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
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.

Re: Card Development Questions

PostPosted: 11 Sep 2011, 05:08
by ArsenalNut
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.
#-o Never mind, it's a mana ability so it shouldn't have gone on the stack in the first place. The choose color ability line needs "Static$ True".

Edit: Just realized Static$ True only works for triggers. Back to the drawing board.

Re: Card Development Questions

PostPosted: 11 Sep 2011, 12:41
by friarsol
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.

Re: Card Development Questions

PostPosted: 11 Sep 2011, 15:18
by slapshot5
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.
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.

-slapshot5

Re: Card Development Questions

PostPosted: 11 Sep 2011, 15:29
by friarsol
slapshot5 wrote:
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.
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.

-slapshot5
That's true. Chosen Color more fits the Sol Grail form (where the ChosenColor is saved) than the Birds of Paradise form.

Re: Card Development Questions

PostPosted: 11 Sep 2011, 16:18
by ArsenalNut
friarsol wrote:
slapshot5 wrote:
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.
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.

-slapshot5
That's true. Chosen Color more fits the Sol Grail form (where the ChosenColor is saved) than the Birds of Paradise form.
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.

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.

Re: Card Development Questions

PostPosted: 11 Sep 2011, 21:25
by Iran
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

Re: Card Development Questions

PostPosted: 12 Sep 2011, 13:02
by ZzzzSleep
friarsol wrote:
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
I'll have this up sometime tonight hopefully. Maybe tomorrow at the latest.
Would you be able to give me an example when this is done? It'd be greatly appreciated.

Re: Card Development Questions

PostPosted: 12 Sep 2011, 13:20
by ArsenalNut
ZzzzSleep wrote:
friarsol wrote:
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
I'll have this up sometime tonight hopefully. Maybe tomorrow at the latest.
Would you be able to give me an example when this is done? It'd be greatly appreciated.
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>".

Re: Card Development Questions

PostPosted: 12 Sep 2011, 19:49
by Iran
I'm trying to script Selective Memory.
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
But I think the SVar Count$TypeInYourLibrary don´t work, because the value of it is Zero.

Any suggestion to script correct this card?

Re: Card Development Questions

PostPosted: 12 Sep 2011, 19:58
by Sloth
Iran wrote:I'm trying to script Selective Memory.
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$ 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
But I think the SVar Count$TypeInYourLibrary don´t work, because the value of it is Zero.

Any suggestion to script correct this card?
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.

Re: Card Development Questions

PostPosted: 12 Sep 2011, 20:04
by Iran
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.
I Test with "Card.nonLand" in ChangeType$ but it don't work, X is zero.