It is currently 07 Jun 2025, 13:00
   
Text Size

Card Development Questions

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Card Development Questions

Postby ArsenalNut » 09 Aug 2011, 17:22

friarsol wrote:
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.
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.
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.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Development Questions

Postby friarsol » 09 Aug 2011, 18:43

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.
What's the current attach line for your script?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby ArsenalNut » 10 Aug 2011, 02:31

friarsol wrote:
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.
What's the current attach line for your script?
Here's my current script
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
The current SVar doesn't work because it counts if an aura is attached to Daybreak Coronet not to the creature that it is enchanting. I need something that switches the source of counting to the enchanted creature.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Development Questions

Postby Sloth » 10 Aug 2011, 15:21

I suggest adding "enchantedByOther" to hasProperty.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Development Questions

Postby 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
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Development Questions

Postby 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
User avatar
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

Postby 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
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Development Questions

Postby 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
User avatar
timmermac
Tester
 
Posts: 1512
Joined: 17 May 2010, 20:36
Has thanked: 18 times
Been thanked: 95 times

Re: Card Development Questions

Postby 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. :D
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
User avatar
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

Postby 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?
slowe
 
Posts: 127
Joined: 05 Jan 2010, 14:04
Has thanked: 6 times
Been thanked: 10 times

Re: Card Development Questions

Postby ArsenalNut » 16 Aug 2011, 03:12

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?
My thought was to use the Remembered list to keep a trigger from going off twice in one turn.

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
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Development Questions

Postby 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.
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
User avatar
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

Postby friarsol » 16 Aug 2011, 12:26

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.
That doesn't quite work. What if you cast multiple instants in response to the trigger. We really just need a single use effect.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Hellfish » 16 Aug 2011, 15:14

:rolleyes: Doi.
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
User avatar
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

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

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

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 55 guests


Who is online

In total there are 55 users online :: 0 registered, 0 hidden and 55 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 55 guests

Login Form