Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by jeffwadsworth » 17 Nov 2011, 16:09
@Moonmarc: Soltari Visionary is not quite correct. The player taking the damage may be you. Note that it doesn't mention combat damage.
- 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 moomarc » 17 Nov 2011, 16:22
Thanks. I'll try fix it tomorrow morning (I'm already packed up for the night). Feel free to remove it from svn for now. That's what I get for not testing for a change. I copied the triggered ability from another card, but I think that was combat damage as you point out, and was determined to commit before I shut down for the night.jeffwadsworth wrote:@Moonmarc: Soltari Visionary is not quite correct. The player taking the damage may be you. Note that it doesn't mention combat damage.

Edit: Fixed
Last edited by moomarc on 18 Nov 2011, 08:57, 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 friarsol » 17 Nov 2011, 18:11
Jeff,
Looks like Twisted Justice isn't right. You target a player, not a creature that the controller sacrifices.
Looks like Twisted Justice isn't right. You target a player, not a creature that the controller sacrifices.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Iran » 17 Nov 2011, 19:49
Exists any way to look at any face-down creature? Trying to script Spy Network and Aven Soulgazer.
Players can't cast spell during combat. Is possible to script it? Trying to script Basandra, Battle Seraph.
Scapeshift. Is possible to script it?
Somone see any problem to script them?
Thanks
Players can't cast spell during combat. Is possible to script it? Trying to script Basandra, Battle Seraph.
Scapeshift. Is possible to script it?
Somone see any problem to script them?
Thanks
Re: Card Development Questions
by jeffwadsworth » 17 Nov 2011, 21:27
Testing Stoneshaker Shaman.
This works fine for the human, but the AI will sacrifice tapped lands. Does anyone see the issue? Of course, this card is pretty unfair to the AI anyway.
- | Open
- Name:Stoneshaker Shaman
ManaCost:2 R
Types:Creature Human Shaman
Text:no text
PT:1/1
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | Execute$ TrigSacYou | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's end step, that player sacrifices an untapped land.
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Opponent | Execute$ TrigSacOpp | Secondary$ True | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's end step, that player sacrifices an untapped land.
SVar:TrigSacYou:AB$ Sacrifice | Cost$ 0 | SacValid$ Land.untapped | SacMessage$ untapped land
SVar:TrigSacOpp:AB$ Sacrifice | Cost$ 0 | Defined$ Opponent | SacValid$ Land.untapped | SacMessage$ untapped land
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/stoneshaker_shaman.jpg
End
This works fine for the human, but the AI will sacrifice tapped lands. Does anyone see the issue? Of course, this card is pretty unfair to the AI anyway.
- 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 moomarc » 18 Nov 2011, 06:17
Basandra, Battle Seraph is in repository already.Iran wrote:Exists any way to look at any face-down creature?
Players can't cast spell during combat. Is possible to script it? Trying to script Basandra, Battle Seraph.
Scapeshift. Is possible to script it?
Scapeshift should be easy. Check Armillary Sphere for basic structure. Then use XChoice and ChosenX (check cards like Bottomless Vault).
-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 Sloth » 18 Nov 2011, 06:25
Yes I think this card is too unfair. It's very likely that the AI will be locked out of the game.jeffwadsworth wrote:Testing Stoneshaker Shaman.
- | Open
- Name:Stoneshaker Shaman
ManaCost:2 R
Types:Creature Human Shaman
Text:no text
PT:1/1
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | Execute$ TrigSacYou | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's end step, that player sacrifices an untapped land.
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Opponent | Execute$ TrigSacOpp | Secondary$ True | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's end step, that player sacrifices an untapped land.
SVar:TrigSacYou:AB$ Sacrifice | Cost$ 0 | SacValid$ Land.untapped | SacMessage$ untapped land
SVar:TrigSacOpp:AB$ Sacrifice | Cost$ 0 | Defined$ Opponent | SacValid$ Land.untapped | SacMessage$ untapped land
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/stoneshaker_shaman.jpg
End
This works fine for the human, but the AI will sacrifice tapped lands. Does anyone see the issue? Of course, this card is pretty unfair to the AI anyway.
Scapeshift is not easy. The sacrificing is not a cost, it happens during resolution.moomarc wrote:Scapeshift should be easy. Check Armillary Sphere for basic structure. Then use XChoice and ChosenX (check cards like Bottomless Vault).
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by moomarc » 18 Nov 2011, 06:32
Sloth wrote:Scapeshift is not easy. The sacrificing is not a cost, it happens during resolution.moomarc wrote:Scapeshift should be easy. Check Armillary Sphere for basic structure. Then use XChoice and ChosenX (check cards like Bottomless Vault).


-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 moomarc » 18 Nov 2011, 06:49
- Ashling's Prerogative | Open
- Name:Ashling's Prerogative
ManaCost:1 R
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseMode | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose odd or even. (Zero is even.)
SVar:ChooseMode:AB$ ChooseNumber | Cost$ 0 | Defined$ You | Min$ 0 | Max$ 1
S:Mode$ Continuous | Affected$ Creature.cmc/Mod.2EQX | AffectedZone$ Hand,Stack,Battlefield,Graveyard,Exile | AddKeyword$ Haste | Description$ Each creature with converted mana cost of the chosen value has haste.
S:Mode$ Continuous | Affected$ Creature.cmc/Mod.2NEX | AffectedZone$ Hand,Stack,Battlefield,Graveyard,Exile | AddKeyword$ CARDNAME enters the battlefield tapped. | Description$ Each creature without converted mana cost of the chosen value enters the battlefield tapped.
SVar:X:Count$ChosenNumber
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ashlings_prerogative.jpg
SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/150.jpg
Oracle:As Ashling's Prerogative enters the battlefield, choose odd or even. (Zero is even.)\nEach creature with converted mana cost of the chosen value has haste.\nEach creature without converted mana cost of the chosen value enters the battlefield tapped.
End
The math function in the affected restriction doesn't work. Is there a different syntax for an in-line function or can they only be used in xCount and Number SVars (in which case I can't see a way to make this card work)? At the moment only creatures with 0 casting cost get the first ability (regardless of chosen number), so I guess the cmc is being nullified completely with the current syntax. The other issue is that the 'CARDNAME enters the battlefield tapped' keyword isn't working. The creatures get the wording, but don't actually tap. So is it one of those that can't be added?
The other modulo card also can't quite be done because it needs the Instill Energy effect which is hardcoded. Might be possible if Phases was added to continuous static effect (see script below).
- Chaos Lord | Open
- Name:Chaos Lord
ManaCost:4 R R R
Types:Creature Human
Text:no text
PT:7/7
K:First Strike
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ EQ0 | Execute$ ChangeControl | TriggerDescription$ At the beginning of your upkeep, target opponent gains control of CARDNAME if the number of permanents is even.
SVar:ChangeControl:AB$GainControl | Cost$ 0 | Defined$ Self | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | SubAbility$ PutCounter | SpellDescription$ Target opponent gains control of CARDNAME.
SVar:X:Count$Valid Permanent/Mod.2
S:Mode$ Continuous | Affected$ Card.Self | Phases$ Declare Attackers: Select Creatures to Attack Computer | AddKeyword$ Haste | Description$ CARDNAME can attack as though it had haste unless it entered the battlefield this turn.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/chaos_lord.jpg
SetInfo:ICE|Rare|http://magiccards.info/scans/en/ia/178.jpg
Oracle:First strike\nAt the beginning of your upkeep, target opponent gains control of Chaos Lord if the number of permanents is even.\nChaos Lord can attack as though it had haste unless it entered the battlefield this turn.
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 Sloth » 18 Nov 2011, 11:15
You can now use Creature.cmcM2X to check for equality modulo 2. "CARDNAME enters the battlefield tapped." is indeed parsed when loading the cards and not at runtime, but this is completely unnecessary. I will see what I can do.moomarc wrote:
- Ashling's Prerogative | Open
- Name:Ashling's Prerogative
ManaCost:1 R
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseMode | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose odd or even. (Zero is even.)
SVar:ChooseMode:AB$ ChooseNumber | Cost$ 0 | Defined$ You | Min$ 0 | Max$ 1
S:Mode$ Continuous | Affected$ Creature.cmc/Mod.2EQX | AffectedZone$ Hand,Stack,Battlefield,Graveyard,Exile | AddKeyword$ Haste | Description$ Each creature with converted mana cost of the chosen value has haste.
S:Mode$ Continuous | Affected$ Creature.cmc/Mod.2NEX | AffectedZone$ Hand,Stack,Battlefield,Graveyard,Exile | AddKeyword$ CARDNAME enters the battlefield tapped. | Description$ Each creature without converted mana cost of the chosen value enters the battlefield tapped.
SVar:X:Count$ChosenNumber
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ashlings_prerogative.jpg
SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/150.jpg
Oracle:As Ashling's Prerogative enters the battlefield, choose odd or even. (Zero is even.)\nEach creature with converted mana cost of the chosen value has haste.\nEach creature without converted mana cost of the chosen value enters the battlefield tapped.
End
The math function in the affected restriction doesn't work. Is there a different syntax for an in-line function or can they only be used in xCount and Number SVars (in which case I can't see a way to make this card work)? At the moment only creatures with 0 casting cost get the first ability (regardless of chosen number), so I guess the cmc is being nullified completely with the current syntax. The other issue is that the 'CARDNAME enters the battlefield tapped' keyword isn't working. The creatures get the wording, but don't actually tap. So is it one of those that can't be added?
[/quote]I've added the keyword "CARDNAME can attack as though it had haste.". The last ability should read:moomarc wrote:The other modulo card also can't quite be done because it needs the Instill Energy effect which is hardcoded. Might be possible if Phases was added to continuous static effect (see script below).
- Chaos Lord | Open
- Name:Chaos Lord
ManaCost:4 R R R
Types:Creature Human
Text:no text
PT:7/7
K:First Strike
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ EQ0 | Execute$ ChangeControl | TriggerDescription$ At the beginning of your upkeep, target opponent gains control of CARDNAME if the number of permanents is even.
SVar:ChangeControl:AB$GainControl | Cost$ 0 | Defined$ Self | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | SubAbility$ PutCounter | SpellDescription$ Target opponent gains control of CARDNAME.
SVar:X:Count$Valid Permanent/Mod.2
S:Mode$ Continuous | Affected$ Card.Self | Phases$ Declare Attackers: Select Creatures to Attack Computer | AddKeyword$ Haste | Description$ CARDNAME can attack as though it had haste unless it entered the battlefield this turn.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/chaos_lord.jpg
SetInfo:ICE|Rare|http://magiccards.info/scans/en/ia/178.jpg
Oracle:First strike\nAt the beginning of your upkeep, target opponent gains control of Chaos Lord if the number of permanents is even.\nChaos Lord can attack as though it had haste unless it entered the battlefield this turn.
End
- Code: Select all
S:Mode$ Continuous | Affected$ Card.Self+notEnteredBattlefieldThisTurn | AddHiddenKeyword$ HIDDEN CARDNAME can attack as though it had haste. | Description$ CARDNAME can attack as though it had haste unless it entered the battlefield this turn.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by moomarc » 18 Nov 2011, 11:42
@Sloth: You're once again my hero!
Thanks

-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 moomarc » 18 Nov 2011, 18:02
Is hybrid mana parsed as a completely different mana, not as individual symbols? The reason I ask is in testing the following script for Dawnglow infusion, only the mana paid for the x cost is counting towards the ConditionManaSpent.
- | Open
- Name:Dawnglow Infusion
ManaCost:X GW
Types:Sorcery
Text:no text
A:SP$ GainLife | Cost$ X GW | LifeAmount$ X | ConditionManaSpent$ G | SubAbility$ WPaid | SpellDescription$ You gain X life if G was spent to cast CARDNAME and X life if W was spent to cast it. (Do both if G W was spent.)
SVar:WPaid:DB$GainLife | Cost$ 0 | LifeAmount$ X | ConditionManaSpent$ W
SVar:X:Count$xPaid
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/dawnglow_infusion.jpg
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 Sloth » 18 Nov 2011, 19:05
Yes the mana spend is not handled correctly here. I also tried to script this card a while ago.moomarc wrote:Is hybrid mana parsed as a completely different mana, not as individual symbols? The reason I ask is in testing the following script for Dawnglow infusion, only the mana paid for the x cost is counting towards the ConditionManaSpent.
- | Open
- Name:Dawnglow Infusion
ManaCost:X GW
Types:Sorcery
Text:no text
A:SP$ GainLife | Cost$ X GW | LifeAmount$ X | ConditionManaSpent$ G | SubAbility$ WPaid | SpellDescription$ You gain X life if G was spent to cast CARDNAME and X life if W was spent to cast it. (Do both if G W was spent.)
SVar:WPaid:DB$GainLife | Cost$ 0 | LifeAmount$ X | ConditionManaSpent$ W
SVar:X:Count$xPaid
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/dawnglow_infusion.jpg
End

-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by jeffwadsworth » 18 Nov 2011, 22:15
This one is a bit bizarre. The script for Ulasht, the Hate Seed.
Now, when this dude enters the battlefield, it gets P1P1 counters for the green creatures, but not for the red creatures. Also, when the charm ability is used (any of the two), it doubles up on the choice list the next time you try to use it. Does anyone see the issue?
- | Open
- Name:Ulasht, the Hate Seed
ManaCost:2 R G
Types:Legendary Creature Hellion Hydra
Text:Ulasht, the Hate Seed enters the battlefield with a +1/+1 counter on it for each other red creature you control and a +1/+1 counter on it for each other green creature you control.
PT:0/0
K:etbCounter:P1P1:X
A:AB$ Charm | Cost$ 1 SubCounter<1/P1P1> | Choices$ DBDamage,DBPutCounter | SpellDescription$ Choose one : Ulasht deals 1 damage to target creature; or put a 1/1 green Saproling creature token onto the battlefield.
SVar:DBDamage:DB$ DealDamage | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ Choose one — Ulasht deals 1 damage to target creature;
SVar:DBPutCounter:DB$ Token | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | TokenOwner$ You | SpellDescription$ or put a 1/1 green Saproling creature token onto the battlefield.
SVar:A:Count$Valid Creature.YouCtrl+Red+Other
SVar:B:Count$Valid Creature.YouCtrl+Green+Other
SVar:X:SVar$A/Plus.B
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ulasht_the_hate_seed.jpg
End
Now, when this dude enters the battlefield, it gets P1P1 counters for the green creatures, but not for the red creatures. Also, when the charm ability is used (any of the two), it doubles up on the choice list the next time you try to use it. Does anyone see the issue?
- 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 41 guests