Page 52 of 141

Re: Card Development Questions

PostPosted: 09 Aug 2011, 17:22
by ArsenalNut
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.

Re: Card Development Questions

PostPosted: 09 Aug 2011, 18:43
by friarsol
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?

Re: Card Development Questions

PostPosted: 10 Aug 2011, 02:31
by ArsenalNut
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.

Re: Card Development Questions

PostPosted: 10 Aug 2011, 15:21
by Sloth
I suggest adding "enchantedByOther" to hasProperty.

Re: Card Development Questions

PostPosted: 15 Aug 2011, 20:32
by ArsenalNut
I saw someone request Chandra, the Firebrand in the Cards Request thread. Is anyone working on it?

Re: Card Development Questions

PostPosted: 15 Aug 2011, 20:44
by Hellfish
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.

Re: Card Development Questions

PostPosted: 15 Aug 2011, 21:19
by ArsenalNut
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.

Re: Card Development Questions

PostPosted: 15 Aug 2011, 21:32
by timmermac
Should be fairly easy to do the -2 part. Just copy the code for Fork minus the spell is red part.

Re: Card Development Questions

PostPosted: 15 Aug 2011, 21:41
by Hellfish
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

Re: Card Development Questions

PostPosted: 15 Aug 2011, 23:28
by slowe
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

PostPosted: 16 Aug 2011, 03:12
by ArsenalNut
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.

Re: Card Development Questions

PostPosted: 16 Aug 2011, 08:28
by Hellfish
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.

Re: Card Development Questions

PostPosted: 16 Aug 2011, 12:26
by friarsol
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.

Re: Card Development Questions

PostPosted: 16 Aug 2011, 15:14
by Hellfish
: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).

Adding a new card

PostPosted: 28 Aug 2011, 15:41
by Ivalen
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