It is currently 25 May 2025, 20:27
   
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 friarsol » 18 Dec 2011, 00:59

moomarc wrote:Are you sure? Its the reverse of a normal unless cost. The actual wording is ...you may pay {U}. IF YOU DON'T... So my understanding is that you would only have to target a knight if you choose not to pay, unlike with a normal unless cost where you select the target first then choose whether to pay the unless cost. That's why I gave the trigger the optional decider so you can opt out before targeting anything.
Whether or not you will pay the mana doesn't make any difference here. You need to declare your target when the trigger hits the stack (just like everything else). Otherwise, how does your opponent know how to respond to the trigger if you choose the target during resolution?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby moomarc » 18 Dec 2011, 01:06

Thanks for clarifying. One day I'll know the rules of Magic too... I'm enjoying finding out just how bad my friends and my interpretation of the rules were.
-Marc
User avatar
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

Postby Sloth » 18 Dec 2011, 12:19

moomarc wrote:On a different note, is there any code in place to count all mana in the mana pool? I'm trying Glissa Sunseeker and it almost works. But the math fuctions only seem to take the first 2 inputs so my current method only counts white and blue mana:
Glissa Sunseeker | Open
Code: Select all
Name:Glissa Sunseeker
ManaCost:2 G G
Types:Legendary Creature Elf
Text:no text
PT:3/2
K:First Strike
A:AB$ Destroy | Cost$ T | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | ConditionCheckSVar$ Y | ConditionSVarCompare$ EQX | SpellDescription$ Destroy target artifact if its converted mana cost is equal to the amount of mana in your mana pool.
SVar:A:Count$ManaPool:white
SVar:B:Count$ManaPool:blue
SVar:C:Count$ManaPool:black
SVar:D:Count$ManaPool:red
SVar:E:Count$ManaPool:green
SVar:X:SVar$A/Plus.B/Plus.C/Plus.D/Plus.E
SVar:Y:Targeted$CardManaCost
#AI doesn't have a mana pool
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/glissa_sunseeker.jpg
SetInfo:MRD|Rare|http://magiccards.info/scans/en/mi/120.jpg
Oracle:First strike\n{T}: Destroy target artifact if its converted mana cost is equal to the amount of mana in your mana pool.
End
For easy testing of the mana counting, just add this to the script:
Code: Select all
A:AB$ GainLife | Cost$ 0 | ValidTgts$ Player | TgtPrompt$ Select target player | LifeAmount$ X | SpellDescription$ Target player gains X life
Its also proven a great testing script for Sol's new mana code. But I'll post feedback on that in the relevant thread.

Anyway, is there a way to add more than 2 SVar values in the same line if there isn't a Count$ManaPool:All equivalent? I've even tried cheating it by splitting it into smaller parts, but that had the same result:
Code: Select all
SVar:A:Count$ManaPool:white
SVar:B:Count$ManaPool:blue
SVar:C:Count$ManaPool:black
SVar:D:Count$ManaPool:red
SVar:E:Count$ManaPool:green
SVar:F:SVar$A/Plus.B
SVar:G:SVar$C/Plus.D
SVar:H:SVar$F/Plus.G
SVar:X:SVar$H/Plus.E
Did you try something like this?:
Code: Select all
SVar:X:Count$ManaPool:white/Plus.B
SVar:B:Count$ManaPool:blue/Plus.C
SVar:C:Count$ManaPool:black/Plus.D
SVar:D:Count$ManaPool:red/Plus.E
SVar:E:Count$ManaPool:green
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 moomarc » 18 Dec 2011, 12:24

Sloth wrote:Did you try something like this?:
Code: Select all
SVar:X:Count$ManaPool:white/Plus.B
SVar:B:Count$ManaPool:blue/Plus.C
SVar:C:Count$ManaPool:black/Plus.D
SVar:D:Count$ManaPool:red/Plus.E
SVar:E:Count$ManaPool:green
Not quite like that with the laddered order. I'll test quickly and get back to you.
-Marc
User avatar
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

Postby moomarc » 18 Dec 2011, 12:32

moomarc wrote:
Sloth wrote:Did you try something like this?:
Code: Select all
SVar:X:Count$ManaPool:white/Plus.B
SVar:B:Count$ManaPool:blue/Plus.C
SVar:C:Count$ManaPool:black/Plus.D
SVar:D:Count$ManaPool:red/Plus.E
SVar:E:Count$ManaPool:green
Not quite like that with the laddered order. I'll test quickly and get back to you.
No, I'm afraid it still only counts the first two. :?
-Marc
User avatar
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

Postby Sloth » 18 Dec 2011, 16:30

moomarc wrote:Testing War's Toll, the second ability doesn't quite work.
War's Toll | Open
Code: Select all
Name:War's Toll
ManaCost:3 R
Types:Enchantment
Text:no text
T:Mode$ TapsForMana | ValidCard$ Land.YouDontCtrl | Execute$ TrigTapAll | TriggerZones$ Battlefield | TriggerDescription$ Whenever an opponent taps a land for mana, tap all lands that player controls.
T:Mode$ Attacks | ValidCard$ Creature.YouDontCtrl | TriggerZones$ Battlefield | Execute$ TrigAttack | TriggerDescription$ If a creature an opponent controls attacks, all creatures that opponent controls attack if able.
SVar:TrigTapAll:AB$TapAll | Cost$ 0 | Defined$ TriggeredPlayer | ValidCards$ Land
SVar:TrigAttack:DB$PumpAll | Defined$ TriggeredPlayer | ValidCards$ Creature | KW$ HIDDEN CARDNAME attacks each turn if able.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/wars_toll.jpg
SetInfo:DIS|Rare|http://magiccards.info/scans/en/di/77.jpg
Oracle:Whenever an opponent taps a land for mana, tap all lands that player controls.\nIf a creature an opponent controls attacks, all creatures that opponent controls attack if able.
End
The ability is only added after the attackers are declared so this method doesn't work. Do we have anything for this situation? Something to make valid cards attack NOW?
I think I will drop implementing War's Toll. Unless some serious work is made, the card is very AI unfriendly.

moomarc wrote:I've just tested Knight of the Mists and it works as expected, but feels a bit clunky and just want some extra feedback if anyone else wants to test it.

The other small point is that rather than adding RemAIDeck, I rather added ManaNeededToAvoidNegativeEffect SVar so that the Ai can still play it as a 2/2 flanker for {2} {U} {U} as he'll wait to have the extra mana and will always pay the unless cost to avoid potentially having to target itself.
ManaNeededToAvoidNegativeEffect only tells the AI what mana to spend on the mana cost, so it will do nothing here. In the future we could make a new SVar like SaveMana for cases like this.
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 jeffwadsworth » 19 Dec 2011, 05:20

friarsol wrote:Anyone want to try converting Cursed Scroll to script? I'm not 100% the NamedCard can be compared the Revealed Card, but it might work.
Done.
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

Postby jeffwadsworth » 19 Dec 2011, 17:59

Testing Veteran's Voice. Does anyone know the correct way to script the ValidTgts$ part?

| Open
Name:Veteran's Voice
ManaCost:R
Types:Enchantment Aura
Text:no text
A:SP$ Attach | Cost$ R | ValidTgts$ Creature.YouCtrl | AILogic$ Pump
A:AB$ Pump | Cost$ tapXType<1/Creature.EnchantedBy/Enchanted Creature> | ValidTgts$ Creature.EnchantedBy+Other | TgtPrompt$ Select target creature other than the creature tapped | NumAtt$ 2 | NumDef$ 1 | SpellDescription$ Target creature other than the creature tapped this way gets +2/+1 until end of turn. Activate this ability only if enchanted creature is untapped.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/veterans_voice.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

Postby moomarc » 19 Dec 2011, 18:23

jeffwadsworth wrote:Testing Veteran's Voice. Does anyone know the correct way to script the ValidTgts$ part?

| Open
Name:Veteran's Voice
ManaCost:R
Types:Enchantment Aura
Text:no text
A:SP$ Attach | Cost$ R | ValidTgts$ Creature.YouCtrl | AILogic$ Pump
A:AB$ Pump | Cost$ tapXType<1/Creature.EnchantedBy/Enchanted Creature> | ValidTgts$ Creature.EnchantedBy+Other | TgtPrompt$ Select target creature other than the creature tapped | NumAtt$ 2 | NumDef$ 1 | SpellDescription$ Target creature other than the creature tapped this way gets +2/+1 until end of turn. Activate this ability only if enchanted creature is untapped.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/veterans_voice.jpg
End
It should be Creature.enchanted+notEnchantedBy. I'm just not sure whether notEnchantedBy is supported.
-Marc
User avatar
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

Postby Sloth » 19 Dec 2011, 18:50

moomarc wrote:It should be Creature.enchanted+notEnchantedBy. I'm just not sure whether notEnchantedBy is supported.
NotEnchantedBy exists. It should just be "Creature.NotEnchantedBy"
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 moomarc » 19 Dec 2011, 19:12

Sloth wrote:
moomarc wrote:It should be Creature.enchanted+notEnchantedBy. I'm just not sure whether notEnchantedBy is supported.
NotEnchantedBy exists. It should just be "Creature.NotEnchantedBy"
Thanks. I'd just read too quickly and thought it was target enchanted creature. 8-[
-Marc
User avatar
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

Postby moomarc » 20 Dec 2011, 17:18

Testing Pyroblast and Hydroblast
Hydroblast | Open
Name:Hydroblast
ManaCost:U
Types:Instant
Text:no text
A:SP$ Counter | Cost$ U | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | ConditionDefined$ Targeted | ConditionPresent$ Card.Red | ConditionCompare$ GE1 | PrecostDesc$ Choose one - | SpellDescription$ Counter target spell if it's red;
A:SP$ Destroy | Cost$ U | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | ConditionDefined$ Targeted | ConditionPresent$ Card.Red | ConditionCompare$ GE1 | SpellDescription$ or destroy target permanent if it's red.
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/hydroblast.jpg
SetInfo:5ED|Uncommon|http://magiccards.info/scans/en/5e/94.jpg
SetInfo:ICE|Common|http://magiccards.info/scans/en/ia/72.jpg
Oracle:Choose one - Counter target spell if it's red; or destroy target permanent if it's red.
End

Pyroblast | Open
Name:Pyroblast
ManaCost:R
Types:Instant
Text:no text
A:SP$ Counter | Cost$ R | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | ConditionDefined$ Targeted | ConditionPresent$ Card.Blue | ConditionCompare$ GE1 | PrecostDesc$ Choose one - | SpellDescription$ Counter target spell if it's blue;
A:SP$ Destroy | Cost$ R | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | ConditionDefined$ Targeted | ConditionPresent$ Card.Blue | ConditionCompare$ GE1 | SpellDescription$ or destroy target permanent if it's blue.
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/pyroblast.jpg
SetInfo:5ED|Uncommon|http://magiccards.info/scans/en/5e/262.jpg
SetInfo:ICE|Common|http://magiccards.info/scans/en/ia/213.jpg
Oracle:Choose one - Counter target spell if it's blue; or destroy target permanent if it's blue.
End

Does anyone know what the correct ConditionDefined value is for the counterspell part? It doesn't work with targeted the same as the destroy part (because of the targeting through a list I'm guessing). I could script it as a tareting restriction because we don't support any cards that change the colour of a spell on the stack at the moment, but I would rather script it properly first time.

Edit: I suddenly realised that by default Conditions apply to the battlefield zone. So I tried adding "ConditionZone$ Stack" but it still doesn't work. Any ideas?

Edit 2: Just checked the script for Cursed Scroll and it seems that a ConditionDefined card will be checked in whichever zone its in. So the first edit is irrelevant. So thanks for looking into it Sol.
Last edited by moomarc on 20 Dec 2011, 17:43, edited 1 time in total.
-Marc
User avatar
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

Postby friarsol » 20 Dec 2011, 17:26

I'll try to take a look at TargetedSAs later this week if Sloth or slapshot doesn't get to it first. It might be similar to why Arcane Denial can't be scripted, which I'd like to get fixed too.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby jeffwadsworth » 20 Dec 2011, 17:43

moomarc wrote:Testing Pyroblast and Hydroblast
Hydroblast | Open
Name:Hydroblast
ManaCost:U
Types:Instant
Text:no text
A:SP$ Counter | Cost$ U | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | ConditionDefined$ Targeted | ConditionPresent$ Card.Red | ConditionCompare$ GE1 | PrecostDesc$ Choose one - | SpellDescription$ Counter target spell if it's red;
A:SP$ Destroy | Cost$ U | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | ConditionDefined$ Targeted | ConditionPresent$ Card.Red | ConditionCompare$ GE1 | SpellDescription$ or destroy target permanent if it's red.
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/hydroblast.jpg
SetInfo:5ED|Uncommon|http://magiccards.info/scans/en/5e/94.jpg
SetInfo:ICE|Common|http://magiccards.info/scans/en/ia/72.jpg
Oracle:Choose one - Counter target spell if it's red; or destroy target permanent if it's red.
End

Pyroblast | Open
Name:Pyroblast
ManaCost:R
Types:Instant
Text:no text
A:SP$ Counter | Cost$ R | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | ConditionDefined$ Targeted | ConditionPresent$ Card.Blue | ConditionCompare$ GE1 | PrecostDesc$ Choose one - | SpellDescription$ Counter target spell if it's blue;
A:SP$ Destroy | Cost$ R | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | ConditionDefined$ Targeted | ConditionPresent$ Card.Blue | ConditionCompare$ GE1 | SpellDescription$ or destroy target permanent if it's blue.
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/pyroblast.jpg
SetInfo:5ED|Uncommon|http://magiccards.info/scans/en/5e/262.jpg
SetInfo:ICE|Common|http://magiccards.info/scans/en/ia/213.jpg
Oracle:Choose one - Counter target spell if it's blue; or destroy target permanent if it's blue.
End

Does anyone know what the correct ConditionDefined value is for the counterspell part? It doesn't work with targeted the same as the destroy part (because of the targeting through a list I'm guessing). I could script it as a tareting restriction because we don't support any cards that change the colour of a spell on the stack at the moment, but I would rather script it properly first time.

Edit: I suddenly realised that by default Conditions apply to the battlefield zone. So I tried adding "ConditionZone$ Stack" but it still doesn't work. Any ideas?
Hehe. I was working on this one too and ran into the same thing. ConditionCheckSVar type stuff does not work either.
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

Postby moomarc » 21 Dec 2011, 13:48

A quick general question: With delayed triggers should the either the initial trigger or delayed trigger be static so that it can't be Stifle -ed or should you be able to counter both triggers?

Part of the reason I want to know is that I've scripted Teferi's Veil. Only issue is that your attacking creatures phase out one at a time instead of all simultaneously (which isn't a problem if the delayed trigger is static). Should I commit like this or wait for PhasesAll to be implemented?
Teferi's Veil | Open
Code: Select all
Name:Teferi's Veil
ManaCost:1 U
Types:Enchantment
Text:no text
T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | DelayedTrigger$ DelayedTrig | TriggerDescription$ Whenever a creature you control attacks, it phases out at end of combat. (While it's phased out, it's treated as though it doesn't exist. It phases in before you untap during your next untap step.)
SVar:DelayedTrig:Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Each | Execute$ TrigPhase | TriggerDescription$ Attacking creatures you control phase out at end of combat.
SVar:TrigPhase:AB$Phases | Cost$ 0 | Defined$ TriggeredAttacker
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/teferis_veil.jpg
SetInfo:WTH|Uncommon|http://magiccards.info/scans/en/wl/53.jpg
Oracle:Whenever a creature you control attacks, it phases out at end of combat. (While it's phased out, it's treated as though it doesn't exist. It phases in before you untap during your next untap step.)
End
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 28 guests


Who is online

In total there are 28 users online :: 0 registered, 0 hidden and 28 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 28 guests

Login Form