It is currently 20 May 2025, 18:35
   
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 Marek14 » 10 Aug 2013, 16:12

Seeing the cards with multizone targeting in the remaining cards file: are things like Chaoslace implemented correctly? (i.e. able to change target from spell to permanent or vice versa)?
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Card Development Questions

Postby friarsol » 11 Aug 2013, 01:22

Marek14 wrote:Seeing the cards with multizone targeting in the remaining cards file: are things like Chaoslace implemented correctly? (i.e. able to change target from spell to permanent or vice versa)?
I think they should be alright. I didn't test redirection at the time (because it didn't exist), but I don't see why they should suffer the same way Clockspinning does. A card will only be in the Stack zone if it's a Spell, and will only be in the Battlefield zone if it's a Permanent. But by allowing for targets to either zone, it should be able to change targets from one to the other without a problem.

Also, I believe those cards were scripted recently.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Marek14 » 12 Aug 2013, 05:35

Noted we're missing Nix, so I have to ask: do cards like Clone work correctly with sunburst? Both this interaction and Nix requires to be always aware what types of mana were used to cast something (as Nix can be basically reworded into "if no white/blue/black/red/green/colorless mana was spent to cast the spell"...
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Card Development Questions

Postby moomarc » 12 Aug 2013, 05:57

Marek14 wrote:Noted we're missing Nix, so I have to ask: do cards like Clone work correctly with sunburst? Both this interaction and Nix requires to be always aware what types of mana were used to cast something (as Nix can be basically reworded into "if no white/blue/black/red/green/colorless mana was spent to cast the spell"...
I actually looked at Nix the other day and the problem is that sunburst doesn't track colorless mana. I looked at another potential way of tracking it but ran out of time before I could get it working.
-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 » 12 Aug 2013, 06:14

Marek14 wrote:Noted we're missing Nix, so I have to ask: do cards like Clone work correctly with sunburst? Both this interaction and Nix requires to be always aware what types of mana were used to cast something (as Nix can be basically reworded into "if no white/blue/black/red/green/colorless mana was spent to cast the spell"...
The spoiled legends of the Commander 2013 set also need to know how much mana was paid to cast them.
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 Marek14 » 12 Aug 2013, 09:05

Sloth wrote:
Marek14 wrote:Noted we're missing Nix, so I have to ask: do cards like Clone work correctly with sunburst? Both this interaction and Nix requires to be always aware what types of mana were used to cast something (as Nix can be basically reworded into "if no white/blue/black/red/green/colorless mana was spent to cast the spell"...
The spoiled legends of the Commander 2013 set also need to know how much mana was paid to cast them.
True...
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Card Development Questions

Postby Marek14 » 14 Aug 2013, 19:41

As for Equinox: the Google file is not entirely correct. Equinox doesn't have a targeting restriction; it can target any spell, it merely has a condition on when the spell is countered. Of course, this condition is pretty hard. The best way to implement it would probably be to:
1. Save a snapshot of the game
2. Resolve the targeted spell immediately regardless on what else is on stack. Find out if at least one land controlled by the controller of the Equinox's ability is destroyed, with all effects counted: Pyramids, regeneration, indestructibility or even Totem armor means the land wouldn't be destroyed (of course, regeneration can be prevented).
3. Restore the snapshot and counter the spell if the check ends up "true". It will be probably more economical if uncounterability of target spell is checked at the very beginning to avoid the complicated process when not necessary.
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Card Development Questions

Postby friarsol » 14 Aug 2013, 20:06

Marek14 wrote:As for Equinox: the Google file is not entirely correct. Equinox doesn't have a targeting restriction; it can target any spell, it merely has a condition on when the spell is countered. Of course, this condition is pretty hard. The best way to implement it would probably be to:
I wouldn't take those descriptions too much to heart. They are just very brief descriptions about what needs to happen. Equinox is stupidly complex, one of my college buddies and I have a discussion about coding it basically everytime I see him if we end up talking Magic. I wouldn't be surprised if it ends up in the last 20 to get scripted.

And of course, your description doesn't even cover "10/4/2004: Equinox will not counter a spell that has a random chance of destroying a land." or "10/1/2008: Will not counter a spell which would destroy a land only if a choice is made." scenarios.

Since I don't particularly see snapshots happening anytime soon, I always pictured it as something like this:
1. Check if Targeted Spell has a Destroy or DestroyAll ability effect somewhere in it's Ability Chain.
2. Check if a land you control is a legal target of or Defined to be destroyed by any of the Destroy effects, and check to make sure this destruction is not behind any random chance or other choices.
3. Check if all of those lands have active destruction prevention via (pseudo)regeneration or indestructible.

But once again, very very complex.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Marek14 » 14 Aug 2013, 21:26

friarsol wrote:
Marek14 wrote:As for Equinox: the Google file is not entirely correct. Equinox doesn't have a targeting restriction; it can target any spell, it merely has a condition on when the spell is countered. Of course, this condition is pretty hard. The best way to implement it would probably be to:
I wouldn't take those descriptions too much to heart. They are just very brief descriptions about what needs to happen. Equinox is stupidly complex, one of my college buddies and I have a discussion about coding it basically everytime I see him if we end up talking Magic. I wouldn't be surprised if it ends up in the last 20 to get scripted.

And of course, your description doesn't even cover "10/4/2004: Equinox will not counter a spell that has a random chance of destroying a land." or "10/1/2008: Will not counter a spell which would destroy a land only if a choice is made." scenarios.

Since I don't particularly see snapshots happening anytime soon, I always pictured it as something like this:
1. Check if Targeted Spell has a Destroy or DestroyAll ability effect somewhere in it's Ability Chain.
2. Check if a land you control is a legal target of or Defined to be destroyed by any of the Destroy effects, and check to make sure this destruction is not behind any random chance or other choices.
3. Check if all of those lands have active destruction prevention via (pseudo)regeneration or indestructible.

But once again, very very complex.
Yes, some cards are like that :) And Wall of Shadows would ideally need a full list of cards that target creature types on the off-chance some smart guy Artificially Evolves it :)
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Card Development Questions

Postby friarsol » 14 Aug 2013, 23:19

Marek14 wrote:Yes, some cards are like that :) And Wall of Shadows would ideally need a full list of cards that target creature types on the off-chance some smart guy Artificially Evolves it :)
Hah, I'm not sure if that should matter. We would just need to check if there's a singular creature type check in the Targeting, and that type is the one that Wall of Shadows cares about (usually walls).

Elvish Pathcutter
AB$ Pump | Cost$ 2 G | ValidTgts$ Creature.Elf | KW$ Forestwalk

Ali Baba
AB$ Tap | Cost$ R | ValidTgts$ Wall

Grassland Crusader
AB$ Pump | Cost$ T | NumAtt$ +2 | NumDef$ +2 | ValidTgts$ Creature.Elf,Creature.Soldier

The hardest part of that is allowing modal spells like Chaos Charm (I roughly count 6 of these right now), due to this note: 10/4/2004: Can be targeted by a modal spell that can target a non-Wall in one of its modes, even if it has a mode that targets only Walls. That spell can, in theory, target a non-Wall, so it is not a "spell that can target only walls".
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Marek14 » 15 Aug 2013, 06:38

Are you sure Grassland Crusader counts? It can normally target creatures of two different types, so unless it's Artificially Evolved to mention the same type twice... :)
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Card Development Questions

Postby friarsol » 15 Aug 2013, 11:51

Marek14 wrote:Are you sure Grassland Crusader counts? It can normally target creatures of two different types, so unless it's Artificially Evolved to mention the same type twice... :)
No it definitely doesn't count. I was showing examples of what we would be looking for.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Marek14 » 19 Aug 2013, 10:58

Spend as other mana: The easiest way would probably be to intercept mana costs before they are paid and replace them with different mana costs (so it only changes what you're asked to pay).

Effects are:
Celestial Dawn: You may spend white mana as though it were mana of any color. You may spend other mana only as though it were colorless mana.
False Dawn: Until end of turn, you may spend white mana as though it were mana of any color.
Mycosynth Lattice: Players may spend mana as though it were mana of any color.
North Star: For one spell this turn, you may spend mana as though it were mana of any color to pay that spell's mana cost.
Quicksilver Elemental: You may spend blue mana as though it were mana of any color to pay the activation costs of Quicksilver Elemental's abilities.
Sunglasses of Urza: You may spend white mana as though it were red mana.

First of all, there's the question of how these effects interact with each other. My best guess is that you can imagine a 6x6 (5 colors + colorless) table of rules: Can I pay mana X when the cost calls for mana Y?
Each of these effects would then modify the rules in timestamp order.

The standard table looks like this:

Code: Select all
 | W U B R G 1
-+------------
W| X O O O O X
U| O X O O O X
B| O O X O O X
R| O O O X O X
G| O O O O X X
1| O O O O O X
Celestial Dawn modifies the table to look like this:

Code: Select all
 | W U B R G 1
-+------------
W| X X X X X X
U| O O O O O X
B| O O O O O X
R| O O O O O X
G| O O O O O X
1| O O O O O X
The False Dawn table looks like this:

Code: Select all
 | W U B R G 1
-+------------
W| X X X X X X
U| O X O O O X
B| O O X O O X
R| O O O X O X
G| O O O O X X
1| O O O O O X
The table for Mycosynth Lattice and North Star looks like this (I presume North Star would work like, say, Omniscience, in that clicking on the spells gives you a choice to play it through North Star effect which would be used up by this -- and of course, North Star would only affect the mana cost itself and not any extra costs):

Code: Select all
 | W U B R G 1
-+------------
W| X X X X X X
U| X X X X X X
B| X X X X X X
R| X X X X X X
G| X X X X X X
1| X X X X X X
For Quicksilver Elemental, the table is similar to False Dawn:

Code: Select all
 | W U B R G 1
-+------------
W| X O O O O X
U| X X X X X X
B| O O X O O X
R| O O O X O X
G| O O O O X X
1| O O O O O X
And finally, for Sunglasses of Urza it looks like this:

Code: Select all
 | W U B R G 1
-+------------
W| X O O X O X
U| O X O O O X
B| O O X O O X
R| O O O X O X
G| O O O O X X
1| O O O O O X
Now, a rules question I'm not sure about is: what if I have two Celestial Dawns and one of them is sleighted, say, black? The table for this modified Celestial Dawn would look like this:

Code: Select all
 | W U B R G 1
-+------------
W| O O O O O X
U| O O O O O X
B| X X X X X X
R| O O O O O X
G| O O O O O X
1| O O O O O X
Will it go by timestamp and the later effect wins? Or will the tables combine in some nontrivial way? Celetial Dawn is the only effect that actually REMOVES entries from the table, all the other only add more.

If we go by timestamp order, let's look at Celestial Dawn + Quicksilver Elemental situation:

Celestial Dawn first would look like this:

Code: Select all
 | W U B R G 1
-+------------
W| X X X X X X
U| X X X X X X
B| O O O O O X
R| O O O O O X
G| O O O O O X
1| O O O O O X
And Quicksilver Elemental first would look just like Celestial Dawn alone since the extra uses of blue mana Quicksilver Elemental allows would be wiped by later Celestial Dawn.

So: mana display. Once you have a valid table, mana display is simple.
1. Generic mana symbol stays generic -- none of these effects change the last column of the table.
2. For colored mana symbol, look its column in table - if there's only one entry, it will be displayed as that mana symbol, if there are multiple entries, it will be displayed as hybrid symbol (with more than 2 choices, potentially), and if all entries are true (which happens with Mycosynth Lattice), it will be displayed as generic mana symbol (and added to other generic symbols).
3. For hybrid mana symbol, look the two columns, otherwise it works identically to option 2.
4. For 2/C or Phyrexian symbols, look the colored column and add the 2 or P option to the resulting symbol.

For example, a hybrid mana {R/G} would become {W} under Celestial Dawn, {R/G/W} under False Darn, {U/R/G} under Quicksilver Elemental, {1} under Mycosynth Lattice and {R/G/W} under Sunglasses of Urza.

This way, every symbol of the cost to be paid will be converted to a symbol depicting mana you are actually allowed to pay for it. However, additional symbols would have to be introduced.
1. A symbol for colorless mana -- if you have Mycosynth Lattice and then Celestial Dawn enters the battlefield, it will wipe uses of colored mana, but not the enhanced use of colorless mana. So a {U} symbol would be payable by white or colorless mana and would have to be displayed as a hybrid cost {W/C}.
2. I suspect there might be a way, eventually, to make a symbol completely unpayable. This should be signified by {!} and a cost including such symbol couldn't be paid.
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Card Development Questions

Postby timmermac » 19 Aug 2013, 12:46

Marek, does Celestial Dawn work like that on BotArena? I haven't tried playing that in ages.
"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 Marek14 » 19 Aug 2013, 13:18

timmermac wrote:Marek, does Celestial Dawn work like that on BotArena? I haven't tried playing that in ages.
I don't think we have that :)
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: MiguelCax and 32 guests


Who is online

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

Login Form