Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by friarsol » 22 Feb 2012, 13:14
Yea I keep thinking it should be added to costs. I had some free time this weekend, but I was trying to get the EndTurn functionality in with only partial luck. Then Skyrim took over the rest of my free time.Sloth wrote:You can delete "K:Kicker:W". This reminds me that we should add a Kicker flag to these spells (or really implement additional costs one day).

Cost$ W Kicker<W>
and then just have an Ability + SubAbility with a "IsKicked" Conditional. We'll have to figure out how the Battlemages would work, since they have two different kickers.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by moomarc » 22 Feb 2012, 20:12
In the case of the battlemages maybe set up a KickerAlt in cost as well that if present pops a dialogue asking which you want to play (as well as a combined option). Not sure of the viability, but from what I've seen in the code in my browsing, it looks doable.
Eg Cost$ 1 R B Kicker<1 R> KickerAlt<1 B> | would create a kicker description of 1 R and/or 1 B for the card info panel and the spell ability selection when cast would have 4 options; 1 R B, 2 R R B, 2 R B B and 3 R R B B.
Eg Cost$ 1 R B Kicker<1 R> KickerAlt<1 B> | would create a kicker description of 1 R and/or 1 B for the card info panel and the spell ability selection when cast would have 4 options; 1 R B, 2 R R B, 2 R B B and 3 R R B B.
Last edited by moomarc on 23 Feb 2012, 09:34, edited 1 time in total.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Development Questions
by jeffwadsworth » 22 Feb 2012, 23:16
While testing some corner cases for Djinn of Wishes, I noticed that the revealed card will make an appearance in Exile during this situation:
In play:
Nether Void
Djinn of Wishes
I activated the Djinn's ability and revealed a Serra Angel. I chose to play it and the Nether Void triggers wanting me to pay 3. The revealed card shows up in Exile while still on the stack. I assume this could be a problem. Now, the revealed card does indeed get sent to the graveyard if it is countered and it clears out of Exile afterward. BTW, I added code for RememberPlayed locally.
In play:
Nether Void
Djinn of Wishes
I activated the Djinn's ability and revealed a Serra Angel. I chose to play it and the Nether Void triggers wanting me to pay 3. The revealed card shows up in Exile while still on the stack. I assume this could be a problem. Now, the revealed card does indeed get sent to the graveyard if it is countered and it clears out of Exile afterward. BTW, I added code for RememberPlayed locally.
- | Open
- Name:Djinn of Wishes
ManaCost:3 U U
Types:Creature Djinn
Text:no text
PT:4/4
K:Flying
K:etbCounter:WISH:3
A:AB$ Dig | Cost$ 2 U U SubCounter<1/WISH> | DigNum$ 1 | Reveal$ True | NoMove$ True | RememberRevealed$ True | SubAbility$ DBPlayIT | SpellDescription$ Reveal the top card of your library. You may play that card without paying its mana cost. If you don't, exile it.
SVar:DBPlayIT:DB$ Play | Defined$ Remembered | Controller$ You | WithoutManaCost$ True | Optional$ True | RememberPlayed$ True | SubAbility$ DBExileIfNotPlayed
SVar:DBExileIfNotPlayed:DB$ ChangeZone | Origin$ Library | Destination$ Exile | Defined$ Remembered | DefinedPlayer$ You | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ1 | SubAbility$ DBDjinnCleanup
SVar:DBDjinnCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/djinn_of_wishes.jpg
End
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by jeffwadsworth » 23 Feb 2012, 02:01
I figured out what went wrong. I had Remembered set up incorrectly in AB Play. Works like a charm now.friarsol wrote:It sounds like your condition isn't right if it's getting moved to Exile. Nothing else would be moving it there.
Last edited by jeffwadsworth on 25 Feb 2012, 02:05, edited 1 time in total.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by Sloth » 23 Feb 2012, 07:29
I promise to leave this task for you Sol.friarsol wrote:Cost$ W Kicker<W>
and then just have an Ability + SubAbility with a "IsKicked" Conditional. We'll have to figure out how the Battlemages would work, since they have two different kickers.

-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by moomarc » 02 Mar 2012, 06:14
Is there any difference between using Count$RememberedSize and Remembered$Amount? (Not quite sure where the best place would be to post this, but here seemed appropriate).
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Development Questions
by jeffwadsworth » 02 Mar 2012, 15:21
RememberedSize is used for counters, I believe. The other is used for remembered cards.moomarc wrote:Is there any difference between using Count$RememberedSize and Remembered$Amount? (Not quite sure where the best place would be to post this, but here seemed appropriate).
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by DeadSpeak » 03 Mar 2012, 10:59
Hey everyone,
I'm not sure this is the right place to write but...
Damia, Sage of Stone
The card say "skip your draw step", but when Damia is in play you get cards up to the 7 cards, and then you draw a card. I think the code for "skip your draw step" is missing?
- DeadSpeak
I'm not sure this is the right place to write but...
Damia, Sage of Stone
The card say "skip your draw step", but when Damia is in play you get cards up to the 7 cards, and then you draw a card. I think the code for "skip your draw step" is missing?
- DeadSpeak
- DeadSpeak
- Posts: 104
- Joined: 25 Dec 2009, 00:14
- Location: Denmark
- Has thanked: 4 times
- Been thanked: 3 times
Re: Card Development Questions
by friarsol » 03 Mar 2012, 14:50
Depending on what version you have please post bug reports in the following threads:DeadSpeak wrote:Hey everyone,
I'm not sure this is the right place to write but...
Damia, Sage of Stone
The card say "skip your draw step", but when Damia is in play you get cards up to the 7 cards, and then you draw a card. I think the code for "skip your draw step" is missing?
- DeadSpeak
The thread announcing the release of the beta or if you are using a nightly release, in Bug reports (snapshot builds).
As per your question, I believe that Keyword isn't right.... And it looks like Sloth already fixed it this morning.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by DeadSpeak » 03 Mar 2012, 20:09
Thanks Sol,
next time I'll include all relevant information.
- DeadSpeak
next time I'll include all relevant information.
- DeadSpeak
- DeadSpeak
- Posts: 104
- Joined: 25 Dec 2009, 00:14
- Location: Denmark
- Has thanked: 4 times
- Been thanked: 3 times
Re: Card Development Questions
by squee1968 » 08 Mar 2012, 14:21
Posting these here because they need help from the devs. The first may work as scripted, but I'm not sure. I believe the second is scripted correctly, but it needs an SVar added that AFAICT, is not in forge already (ClericsYouControl).
EDIT2: little improvement on the description.
- Code: Select all
Name:Oriss, Samite Guardian
ManaCost:1 W W
Types:Legendary Creature Human Cleric
Text:no text
PT:1/3
A:AB$ Pump | Cost$ T | KW$ HIDDEN Prevent all damage that would be dealt to CARDNAME. | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Prevent all damage that would be dealt to target creature this turn.
A:AB$ Effect | Cost$ Discard<1/Card.namedOriss, Samite Guardian> | CostDesc$ Grandeur - Discard another card named CARDNAME:| Name$ Oriss Effect | IsCurse$ True | StaticAbilities$ CantBeCast | ValidTgts$ Player | RememberObjects$ Targeted | AILogic$ BeginningOfOppTurn | SubAbility$ DBPump | SpellDescription$ Target player can't cast spells this turn, and creatures that player controls can't attack this turn.
SVar:CantBeCast:Mode$ CantBeCast | ValidCard$ Card | Caster$ Player.IsRemembered | Description$ Target player can't cast spells this turn, and creatures that player controls can't attack this turn.
SVar:DBPump:DB$PumpAll | Defined$ Targeted | ValidCards$ Creature | KW$ HIDDEN CARDNAME can't attack.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/oriss_samite_guardian.jpg
SetInfo:FUT|Rare|http://magiccards.info/scans/fut/en/28.jpg
Oracle:{T}: Prevent all damage that would be dealt to target creature this turn.\nGrandeur — Discard another card named Oriss, Samite Guardian: Target player can't cast spells this turn, and creatures that player controls can't attack this turn.
End
- Code: Select all
Name:Battletide Alchemist
ManaCost:3 W W
Types:Creature Kithkin Cleric
Text:no text
PT:3/4
S:Mode$ PreventDamage | Target$ Player | Amount$ X | OptionalDecider$ You | Description$ If a source would deal damage to a player, you may prevent X of that damage, where X is the number of Clerics you control.
SVar:X:Count$Valid Cleric.YouCtrl
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/battletide_alchemist.jpg
SetInfo:MOR|Rare|http://magiccards.info/scans/mt/en/2.jpg
Oracle:If a source would deal damage to a player, you may prevent X of that damage, where X is the number of Clerics you control.
End
EDIT2: little improvement on the description.
Last edited by squee1968 on 09 Mar 2012, 19:59, edited 2 times in total.
Re: Card Development Questions
by moomarc » 08 Mar 2012, 14:26
For ClericsYouControl simply use Cleric.YouCtrl (as you would with targeting restrictions)squee1968 wrote:Posting these here because they need help from the devs. The first may work as scripted, but I'm not sure. I believe the second is scripted correctly, but it needs an SVar added that AFAICT, is not in forge already (ClericsYouControl).
- Code: Select all
Name:Oriss, Samite Guardian
ManaCost:1 W W
Types:Legendary Creature Human Cleric
Text:no text
PT:1/3
A:AB$ Pump | Cost$ T | KW$ HIDDEN Prevent all damage that would be dealt to CARDNAME. | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Prevent all damage that would be dealt to target creature this turn.
A:SP$ Effect | Cost$ Discard<1/Card.namedOriss, Samite Guardian> | CostDesc$ Grandeur - Discard another card named CARDNAME:| Name$ Oriss Effect | IsCurse$ True | StaticAbilities$ CantBeCast | ValidTgts$ Player | RememberObjects$ Targeted | AILogic$ BeginningOfOppTurn | SubAbility$ DBPump | SpellDescription$ Target player can't cast spells this turn, and creatures that player controls can't attack this turn.
SVar:CantBeCast:Mode$ CantBeCast | ValidCard$ Card | Caster$ Player.IsRemembered | Description$ Target player can't cast spells this turn.
SVar:DBPump:DB$PumpAll | Defined$ Targeted | ValidCards$ Creature | KW$ HIDDEN CARDNAME can't attack.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/oriss_samite_guardian.jpg
SetInfo:FUT|Rare|http://magiccards.info/scans/fut/en/28.jpg
Oracle:{T}: Prevent all damage that would be dealt to target creature this turn.\nGrandeur — Discard another card named Oriss, Samite Guardian: Target player can't cast spells this turn, and creatures that player controls can't attack this turn.
End
- Code: Select all
Name:Battletide Alchemist
ManaCost:3 W W
Types:Creature Kithkin Cleric
Text:no text
PT:3/4
S:Mode$ PreventDamage | Target$ Player | Amount$ X | OptionalDecider$ You | Description$ If a source would deal damage to a player, you may prevent X of that damage, where X is the number of Clerics you control.
SVar:X:Count$Valid ClericsYouControl
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/battletide_alchemist.jpg
SetInfo:MOR|Rare|http://magiccards.info/scans/mt/en/2.jpg
Oracle:If a source would deal damage to a player, you may prevent X of that damage, where X is the number of Clerics you control.
End
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Development Questions
by squee1968 » 08 Mar 2012, 21:29
Is there support for "OptionalDecider$ You" in AF_PreventDamage? If not, can you add it? I'm playtesting Battlefield Alchemist, with the SVar you said, but it isn't giving me the opportunity to say no to the prevention. And have you gotten a chance to look at the other card? Will it work as scripted?
Re: Card Development Questions
by jeffwadsworth » 08 Mar 2012, 23:11
PreventDamage is a StaticAbility. Its "handler" StaticAbility.java does not have anything setup for OptionalDecider$ yet. Handlers for Triggers and Replacement effects have it coded. It shouldn't be too crazy to copy its functionality over.squee1968 wrote:Is there support for "OptionalDecider$ You" in AF_PreventDamage? If not, can you add it? I'm playtesting Battlefield Alchemist, with the SVar you said, but it isn't giving me the opportunity to say no to the prevention. And have you gotten a chance to look at the other card? Will it work as scripted?
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Who is online
Users browsing this forum: No registered users and 46 guests