Page 6 of 141

Re: Card Development Questions

PostPosted: 01 Jan 2011, 06:23
by craygz
sorry for bumping this thread and maybe asking a silly question. using the keyword list + the examples "floating around" in the cardfolder i tried to create one of the cards i request in the Card Requests thread.

even though i believe it should theoretically work it does not. (to be more precise the pumps don't resolve into actual abilities - the level-up part of the creature works perfectly fine) it seems like the keyword "tap: add G" is not interchangeable with keywords like "flying" or similar. is that by design, not yet implemented or did i do something else horrible wrong?
i would be grateful for any advice or help you could provide.

Code: Select all
Name:Joraga Treespeaker
ManaCost:G
Types:Creature Elf Druid
Text:no text
PT:1/1
K:stSetPT:1:1:LevelGE1:1:2:LevelGE5:1:4:no text.
K:stPumpSelf:Creature.countersGE1LEVEL:0/0/tap: add G G:no Condition:Tap: Add G G to your mana pool.
K:stPumpOther:Creature.Elf+YouCtrl:0/0/tap: add G G:isPresent Creature.countersGE5LEVEL+Self:Elves you control have "Tap: Add G G to your mana pool."
K:Level up:1 G
K:maxLevel:5
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/jraga_treespeaker.jpg
SetInfo:ROE|Uncommon|http://magiccards.info/scans/en/roe/190.jpg
End

Re: Card Development Questions

PostPosted: 01 Jan 2011, 07:45
by SoulStorm
Craygz, I don't believe Joraga Treespeaker can be added strictly through keyword at this time. AbilityFactory will probably be able to handle cards like this in the future. The syntax that can be used with stPump is limited.

I'm still in the very early learning stages myself, so one of the more experienced developers will probably be able to give you a much better answer to your question. You can check out the API for more information as well: http://www.slightlymagic.net/wiki/Forge_API

Re: Card Development Questions

PostPosted: 02 Jan 2011, 05:17
by friarsol
For those looking for some new cards to do I just went through Prophecy and found a bunch. They'll be good practice, plus it'll beef up one of the sets that we have not as many cards in.

Code: Select all
Alexi, Zephyr Mage (similar to Mishra's Helix)
Bog Glider
Devastate
Endbringer's Revel
Excavation
Fault Riders
Foil
Hazy Homunculus
Inflame (similar to Opportunist)
Jeweled Spirit
Jolrael's Favor
Keldon Arsonist
Mine Bearer
Quicksilver Wall
Snag
Stormwatch Eagle
Sword Dancer
Thrive
Trenching Steed
Veteran Brawlers (i think this can be done, might be tricky)
Wall of Vipers

Re: Card Development Questions

PostPosted: 02 Jan 2011, 10:08
by Sloth
I want to note that the AI can't react correctly to the following cards:
Code: Select all
Hazy Homunculus
Veteran Brawlers (i think this can be done, might be tricky)
Wall of Vipers
Maybe we shouldn't rush to add them?

Re: Card Development Questions

PostPosted: 06 Jan 2011, 19:37
by Jaedayr
Now for the totally noob question of the day. What do AB, DB and SP mean when used in AbilityFactory? I am guessing that they denote when an ability can be used but am really not sure.

Re: Card Development Questions

PostPosted: 06 Jan 2011, 19:59
by friarsol
Jaedayr wrote:Now for the totally noob question of the day. What do AB, DB and SP mean when used in AbilityFactory? I am guessing that they denote when an ability can be used but am really not sure.
AB is for Abilities. SP is for Spells. DB is for Drawbacks.

The only non-obvious one is a Drawback, which can be attached to any AF to chain AFs to each other on resolution. You shouldn't see Drawback on it's own.

Wheel of Fortune could be coded something like this:
Code: Select all
A:SP$Discard | Cost$ 2 R | Defined$ Each | Mode$ Hand | SubAbility$ SVar=DBDraw
SVar:DBDraw:DB$Draw | NumCards$ 7 | Defined$ Each
this designates that Wheel of Fortune is a spell, but it also has a drawback.

Re: Card Development Questions

PostPosted: 06 Jan 2011, 20:28
by timmermac
I am trying to add a card to my local copy of the game, just to see if I can, and to see if I can add a few other cards that I'd like to use on as well. I'm hoping this can be done with just a text file, because I know pretty much nothing about coding in Java. Right now, my attempt is Doomsday Specter. Is this card possible to add with just a text file, or would it have to be coded? So far, my attempts to do it have resulted in epic failure, as the text file has been killing my local copy. The text I've been trying to use is in the Card Requests topic.

Re: Card Development Questions

PostPosted: 06 Jan 2011, 21:11
by Jaedayr
I am trying to add Silverglade Elemental by using info from existing cards. I can't get it to work and don't know if it is something simple or if it will require more than just the txt file. Any advice is appreciated. Here is what does not work.

Code: Select all
Name:Silverglade Elemental
ManaCost:4 G
Types:Creature Elemental
Text:no text
PT:4/4
K:SP$ChangeZone | Cost$ 4 G | Origin$ Library | Destination$ Battlefield | ChangeType$ Forest | ChangeNum$ 1 | SpellDescription$ When CARDNAME enters the battlefield, you may search your library for a Forest card and put that card onto the battlefield. If you do, shuffle your library.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/silverglade_elemental.jpg
End

Re: Card Development Questions

PostPosted: 06 Jan 2011, 22:18
by slapshot5
Jaedayr wrote:I am trying to add Silverglade Elemental by using info from existing cards. I can't get it to work and don't know if it is something simple or if it will require more than just the txt file. Any advice is appreciated. Here is what does not work.

Code: Select all
Name:Silverglade Elemental
ManaCost:4 G
Types:Creature Elemental
Text:no text
PT:4/4
K:SP$ChangeZone | Cost$ 4 G | Origin$ Library | Destination$ Battlefield | ChangeType$ Forest | ChangeNum$ 1 | SpellDescription$ When CARDNAME enters the battlefield, you may search your library for a Forest card and put that card onto the battlefield. If you do, shuffle your library.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/silverglade_elemental.jpg
End
Well, AbilityFactory doesn't handle "enters the battlefield" abilities yet, so it won't work anyway. And you need to preface the SP$ChangeZone line with an "A", not a "K".

-slapshot5

Re: Card Development Questions

PostPosted: 06 Jan 2011, 22:37
by Chris H.
Yeah, AbilityFactory does not yet handle enters the battlefield variants. It is on the to do list.

Oh, and "A:SP$" is used for instants and sorceries while "A:AB$" is used for permanents. :D

Re: Card Development Questions

PostPosted: 06 Jan 2011, 22:45
by friarsol
Chris H. wrote:Oh, and "A:SP$" is used for instants and sorceries while "A:AB$" is used for permanents. :D
Except for the cases where Spells have Abilities. Simply: you "Cast" a Spell, you "Activate" an Ability. No matter what the source card is.

Re: Card Development Questions

PostPosted: 06 Jan 2011, 22:50
by Chris H.
friarsol wrote:
Chris H. wrote:Oh, and "A:SP$" is used for instants and sorceries while "A:AB$" is used for permanents. :D
Except for the cases where Spells have Abilities. Simply: you "Cast" a Spell, you "Activate" an Ability. No matter what the source card is.
`
I did not consider that possibility. Do you have an example in mind? You peaked my curiosity. :D

Re: Card Development Questions

PostPosted: 06 Jan 2011, 23:01
by friarsol
Chris H. wrote:I did not consider that possibility. Do you have an example in mind? You peaked my curiosity. :D
Many and many.
One simple one: Cycling. Currently Cycling is it's own keyword, but it could be done using AFs...

Code: Select all
AB$Draw | Cost$ 2 Discard<1/CARDNAME> | NumCards$ 1
and a complex one:

Hammer of Bogardan 's return ability
Code: Select all
A:AB$ChangeZone | Cost$ 2 R R R | Origin$ Graveyard | Destination$ Hand | ActivatingZone$ Graveyard | ActivatingPhases$ Upkeep | PlayerTurn$ True | SpellDescription$ Return Hammer of Bogardan from your graveyard to your hand. Activate this ability only during your upkeep.

Re: Card Development Questions

PostPosted: 07 Jan 2011, 00:18
by Jaedayr
YACDQ - yet another card development question

I created Sailmonger using text from Arnjlot's Ascent and can play it just fine but when I activate it and pay the cost it does not do anything to my creature. However, the AI had no problem using it on it's own creature and it worked fine.

Code: Select all
Name:Sailmonger
ManaCost:3 U
Types:Creature - Human Monger
Text:no text
PT:3/3
A:AB$Pump | Cost$ 2 | AnyPlayer$ True | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Flying | SpellDescription$ Target creature gains flying until end of turn.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/sailmonger.jpg
End
Also I noticed that the info box in game has an extra hyphen in the name "Creature - - Human Monger"

Re: Card Development Questions

PostPosted: 07 Jan 2011, 03:12
by slapshot5
Jaedayr wrote:Also I noticed that the info box in game has an extra hyphen in the name "Creature - - Human Monger"
You don't need to add hyphens in the Types: field. Just list them as:
Code: Select all
Creature Human Monger
Don't know why that card isn't working for you.
-slapshot5