Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by ArsenalNut » 09 Aug 2011, 17:22
That's what sparked the question. I can step up a trigger to remove it based on the value of an SVar but I need a a way to count all Auras attached to the card enchanted by Daybreak Coronet.friarsol wrote:Someone else will have to chime in for the the xCount question, but make sure the Coronet falls off properly if the other Aura is removed.ArsenalNut wrote:I am trying to script Daybreak Coronet. The initial attach is no problem. Is there a way to count the number of other Auras attached to same the card that Daybreak Coronet is attached? I didn't find anything in the xCount code but I wanted to make sure I didn't miss something before I tried to add code to do 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 friarsol » 09 Aug 2011, 18:43
What's the current attach line for your script?ArsenalNut wrote:That's what sparked the question. I can step up a trigger to remove it based on the value of an SVar but I need a a way to count all Auras attached to the card enchanted by Daybreak Coronet.
- 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 » 10 Aug 2011, 02:31
Here's my current scriptfriarsol wrote:What's the current attach line for your script?ArsenalNut wrote:That's what sparked the question. I can step up a trigger to remove it based on the value of an SVar but I need a a way to count all Auras attached to the card enchanted by Daybreak Coronet.
- Code: Select all
Name:Daybreak Coronet
ManaCost:W W
Types:Enchantment Aura
Text:Enchant creature with another Aura attached to it
K:Enchant creature
A:SP$ Attach | Cost$ W W | ValidTgts$ Creature.enchanted | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 3 | AddToughness$ 3 | AddKeyword$ First Strike,Vigilance,Lifelink | Description$ Enchanted creature gets +3/+3 and has first strike, vigilance, and lifelink. (Damage dealt by the creature also causes its controller to gain that much life.)
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Aura.Other | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ EQ1 | Execute$ TrigRemove | Static$ True
SVar:TrigRemove:AB$ ChangeZone | Origin$ Battlefield | Destination$ Graveyard | Defined$ Self
SVar:X:Count$Valid Aura.AttachedBy
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/daybreak_coronet.jpg
End
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 Sloth » 10 Aug 2011, 15:21
I suggest adding "enchantedByOther" to hasProperty.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by ArsenalNut » 15 Aug 2011, 20:32
I saw someone request Chandra, the Firebrand in the Cards Request thread. Is anyone working on 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 Hellfish » 15 Aug 2011, 20:44
Quickly mulling it over in my head and I don't see much problem with it.The most problematic ability seems to be -2 and that should be handled fine using an Effect with a SpellCast trigger that runs an AF_CopySpell ability. If nobody has claimed it/done it by saturday I'm on it like brie on crackers.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Card Development Questions
by ArsenalNut » 15 Aug 2011, 21:19
I haven't looked at planeswalker card yet so I was looking to learn. If I haven't figured it out by Saturday, I'll post what I've got.
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 timmermac » 15 Aug 2011, 21:32
Should be fairly easy to do the -2 part. Just copy the code for Fork minus the spell is red part.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
Re: Card Development Questions
by Hellfish » 15 Aug 2011, 21:41
Go ahead, I just experimented a bit with this to see if anything needed coding up. Hot tip: It can all be done in script. 

So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Card Development Questions
by slowe » 15 Aug 2011, 23:28
I thought about this a little the other day, and the obstacle I ran into was ensuring that only the next instant/sorcery you play (this turn) triggers the copying. I feel like you'd need a custom duration parameter. Is there a way to handle that duration?
Re: Card Development Questions
by ArsenalNut » 16 Aug 2011, 03:12
My thought was to use the Remembered list to keep a trigger from going off twice in one turn.slowe wrote:I thought about this a little the other day, and the obstacle I ran into was ensuring that only the next instant/sorcery you play (this turn) triggers the copying. I feel like you'd need a custom duration parameter. Is there a way to handle that duration?
Activate -2 ability sequence would be
1)Animate or Effect to add trigger so trigger goes away at end of turn. Trigger uses CheckSvar on the amount in Remembered as part of the triggering logic.
2)Clear Remember list
1st time trigger, use RememberTgts to put something in the list during resolve.
2nd time trigger, Remembered$Amount is not equal 0, so it doesn't fire.
The flaw in my logic is that not every Sorcery or Instant will have a target that will add to list with RememberTgts, e.g. Wrath of God. CopySpell doesn't have a Remember key. I could add one to make it work, but if Hellfish has another way I'd like to learn.
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 Hellfish » 16 Aug 2011, 08:28
It's quite simple for the duration, really. Just have the effect exile itself after copying the spell. 
About remembering the old targets, I just left that up to AF_CopySpell.

About remembering the old targets, I just left that up to AF_CopySpell.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Card Development Questions
by friarsol » 16 Aug 2011, 12:26
That doesn't quite work. What if you cast multiple instants in response to the trigger. We really just need a single use effect.Hellfish wrote:It's quite simple for the duration, really. Just have the effect exile itself after copying the spell.
About remembering the old targets, I just left that up to AF_CopySpell.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Hellfish » 16 Aug 2011, 15:14

What about an identical, except being Static$ True, trigger that exiles the effect? In the beta that causes a ConcurrentModificationException but that is easily taken care of (in fact, that's done already).
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Adding a new card
by Ivalen » 28 Aug 2011, 15:41
Do I need a full blown development environment to add a new card, or is it simply a matter of correctly formatting a .txt file in the cardsfolder tree?
If it's the second, then when I run Forge I cannot get it to recognize the following attempt to half-implement Searing Blaze.
If it's the second, then when I run Forge I cannot get it to recognize the following attempt to half-implement Searing Blaze.
- Code: Select all
Name:Searing Blaze
ManaCost:2 R
Types:Instant
Text:no text
A:SP$ DealDamage | Cost$ 2 R | Tgt$ TgtC | numDmg$ X | SubAbility$ SVar=Targetplayer | SpellDescription$ CARDNAME deals 1 damage to target creature or 3 damage to target creature if a land was played this turn.
SVar:Targetplayer | SP$ DealDamage | Cost$ 2 R | Tgt$ TgtP | numDmg$ X | SpellDescription$ CARDNAME deals 1 damage to target creature's controller or 3 damage to creature's controller if a land was played this turn.
SVar:X:Count$Landfall.3.1
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/searing_blaze.jpg
SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/90.jpg
End
- Ivalen
- Posts: 22
- Joined: 23 Jan 2011, 15:19
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 55 guests