It is currently 28 Apr 2024, 05:33
   
Text Size

Magic Data

General Discussion of the Intricacies

Moderator: CCGHQ Admins

Re: Magic Data

Postby Marek14 » 14 Oct 2010, 12:56

There seems to be a weird character in the last ability of Koth of the Hammer.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Magic Data

Postby Arch » 14 Oct 2010, 18:26

Updated for future releases. Also added some verification to avoid such things in the future. (Should have done that a long time ago.)
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby Ark » 22 Oct 2010, 05:49

Marek14 wrote:There seems to be a weird character in the last ability of Koth of the Hammer.
It's a http://www.fileformat.info/info/unicode ... /index.htm

Check out viewtopic.php?f=15&t=3371 if you want an easy way to get card data in a variety of formats (XML, CSV, C++, PHP, JSON).
User avatar
Ark
Programmer
 
Posts: 350
Joined: 16 Jul 2008, 04:29
Has thanked: 10 times
Been thanked: 103 times

Re: Magic Data

Postby Marek14 » 22 Oct 2010, 06:23

The point was that is wasn't showing correctly in the text file.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Magic Data

Postby Ark » 22 Oct 2010, 15:03

Marek14 wrote:The point was that is wasn't showing correctly in the text file.
That's a problem with the viewer you are viewing the text file in. It is not a basic ASCII symbol.
User avatar
Ark
Programmer
 
Posts: 350
Joined: 16 Jul 2008, 04:29
Has thanked: 10 times
Been thanked: 103 times

Re: Magic Data

Postby Marek14 » 22 Oct 2010, 15:22

Yes, while all the other characters in the file are. I think it SHOULD be basic ASCII.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Magic Data

Postby Ark » 22 Oct 2010, 17:15

Marek14 wrote:Yes, while all the other characters in the file are. I think it SHOULD be basic ASCII.
It isn't though. And how would foreign letters display in basic ASCII? You can't even do the Spanish N with the ~ without a codepage mapping for the upper 128 characters, or using some sort of Unicode format.

Gatherer supports many languages and is UTF-8. It is just coincidence that MOST of the English text works when you view it as ASCII, because it is only basic letters. It is not guaranteed, and they could change all the quotes and double quotes from the basic ASCII ' and " to the smart left/right style quotes in the future if they wanted.
User avatar
Ark
Programmer
 
Posts: 350
Joined: 16 Jul 2008, 04:29
Has thanked: 10 times
Been thanked: 103 times

Re: Magic Data

Postby Arch » 23 Oct 2010, 11:50

Ark wrote:It isn't though. And how would foreign letters display in basic ASCII? You can't even do the Spanish N with the ~ without a codepage mapping for the upper 128 characters, or using some sort of Unicode format.

Gatherer supports many languages and is UTF-8. It is just coincidence that MOST of the English text works when you view it as ASCII, because it is only basic letters. It is not guaranteed, and they could change all the quotes and double quotes from the basic ASCII ' and " to the smart left/right style quotes in the future if they wanted.
This is irrelevant though as the data we are talking about is a text file in english that is meant for human consumption.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby Ark » 23 Oct 2010, 12:24

Arch wrote:This is irrelevant though as the data we are talking about is a text file in english that is meant for human consumption.
That doesn't change anything. The U+2018 glyph is still English, and not part of basic ASCII. Human consumption does not imply that you limit yourself to lower ASCII 32-126 single byte characters. Your viewer has a problem, even if your viewer is Notepad, if it is displaying that incorrectly. The creator of the text file in question may not have inserted the UTF-8 BOM at the start of the file that typically tells Notepad to decode the file as UTF-8 instead of ASCII.
User avatar
Ark
Programmer
 
Posts: 350
Joined: 16 Jul 2008, 04:29
Has thanked: 10 times
Been thanked: 103 times

Re: Magic Data

Postby Arch » 24 Oct 2010, 15:47

Did not know about BOM.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby Marek14 » 26 Nov 2010, 08:04

I tried to make Oracle version of Astral cards. Barring precise details of random choice, this could be a start:

Aswan Jaguar
1GG
Creature - Cat
2/2
As Aswan Jaguar enters the battlefield, choose a creature type at random from among all creature types that a creature card in target opponent's decklist has.
GG, T: Destroy target creature with the chosen type. It can't be regenerated.

Call from the Grave
2B
Sorcery
Choose a player at random. Choose a creature card in that player's graveyard at random and put it onto the battlefield under your control. Call from the Grave deals damage equal to that creature card's converted mana cost to you.

Faerie Dragon
2GG
Creature - Dragon
1/3
Flying
1GG: Perform a random action from the following list:
A creature chosen at random gains trample and gets +X/+0 until end of turn, where X is its power. At the beginning of the next end step, destroy that creature if it attacked this turn.
You may tap or untap an artifact, creature, or land chosen at random.
If a creature chosen at random has toughness 5 or greater, it gets +4/-4 until end of turn. Otherwise, it gets +4/-X until end of turn, where X is its toughness minus 1.
A spell or permanent chosen at random becomes green. (Mana symbols on that permanent remain unchanged.)
A spell or permanent chosen at random becomes white. (Mana symbols on that permanent remain unchanged.)
A spell or permanent chosen at random becomes red. (Mana symbols on that permanent remain unchanged.)
Faerie Dragon deals 3 damage to a creature or player chosen at random.
A creature chosen at random gains flying until end of turn.
A creature chosen at random gets +3/+3 until end of turn.
A creature chosen at random gains banding until end of turn. (Any creatures with banding, and up to one without, can attack in a band. Bands are blocked as a group. If any creatures with banding a player controls are blocking or being blocked by a creature, that player divides that creature's combat damage, not its controller, among any of the creatures it's being blocked by or is blocking.)
A spell or permanent chosen at random becomes black. (Mana symbols on that permanent remain unchanged.)
A spell or permanent chosen at random becomes blue. (Mana symbols on that permanent remain unchanged.)
A creature chosen at random can't be regenerated this turn.
If a creature chosen at random has power 2 or less, it is unblockable this turn.
A creature chosen at random gets -2/-0 until end of turn.
Return a creature chosen at random to its owner's hand.
Faerie Dragon deals 1 damage to a creature or player chosen at random.
A creature other than Faerie Dragon chosen at random becomes 0/2 until end of turn.
Exile a creature chosen at random. Its controller gains life equal to its power.
Randomly distribute X -0/-1 counters among a random number of creatures chosen at random.

Gem Bazaar
Land
As Gem Bazaar enters the battlefield, choose a color at random.
T: Add one mana of the last chosen color to your mana pool. Then choose a color at random.

Goblin Polka Band
RR
Creature - Goblin
1/1
2, T: Choose any number of target creatures at random. Tap those creatures. Goblins tapped this way do not untap during their controllers' next untap steps. This ability costs R more to activate for each target.

Necropolis of Azar
2BB
Enchantment
Whenever a nonblack creature is put into a graveyard from the battlefield, put a husk counter on Necropolis of Azar.
5, Remove a husk counter from Necropolis of Azar: Put a X/Y black Spawn creature token named Spawn of Azar with swampwalk onto the battlefield, where X and Y are numbers chosen at random from 1 to 3.

Orcish Catapult
XRR
Instant
Randomly distribute X -0/-1 counters among a random number of random target creatures.

Pandora's Box
5
Artifact
3, T: Choose a creature card at random from all players' decklists. For each player, flip a coin. If the flip ends up heads, put a token that's a copy of that creature card onto the battlefield under that player's control.

Power Struggle
2UUU
Enchantment
At the beginning of each player's upkeep, exchange control of a target artifact, creature or land that player controls, chosen at random, and a random target permanent that shares one of those types with it a player who is his or her opponent chosen at random.

Prismatic Dragon
2WW
Creature - Dragon
2/3
Flying
At the beginning of your upkeep, Prismatic Dragon becomes a color chosen at random. (This effect lasts indefinitely.)
2: Prismatic Dragon becomes a color chosen at random. (This effect lasts indefinitely.)

Rainbow Knights
WW
Creature - Human Knight
2/1
As Rainbow Knights enters the battlefield, it gains protection from a color chosen at random. (This effect lasts indefinitely.)
1: Rainbow Knights gains first strike until end of turn.
WW: Rainbow Knights gets +X/+0 until end of turn, where X is a number chosen randomly from 0 to 2.

Whimsy
XUU
Sorcery
Perform X random actions from the following list:
Return a permanent that isn't enchanted chosen at random to its owner's hand.
Untap a artifact, creature or land chosen at random.
Tap a artifact, creature or land chosen at random.
Whimsy deals 4 damage to a creature or player chosen at random.
A player chosen at random draws three cards.
Destroy an artifact chosen at random. It can't be regenerated. That artifact's controller gains life equal to its converted mana cost.
Destroy an artifact or enchantment chosen at random.
A player chosen at random gains 3 life.
Prevent the next 3 damage that would be dealt to a creature or player chosen at random this turn.
Destroy a creature or land chosen at random. It can't be regenerated.
A player chosen at random puts the top two cards of his or her library into his or her graveyard.
Put a 1/1 colorless Insect artifact creature token with flying named Wasp onto the battlefield. (It can't be blocked except by creatures with flying or reach.)
Destroy all artifacts, creatures and enchantments.
Flip a coin. If you lose the flip, Whimsy deals 5 damage to you. If you win the flip, put a 5/5 colorless Djinn artifact creature token with flying onto the battlefield.
Choose a creature card at random from all players' decklists. For each player, flip a coin. If the flip ends up heads, put a token that's a copy of that creature card onto the battlefield under that player's control.
A player chosen at random discards a card.
Prevent all combat damage that would be dealt this turn.
Draw a card and reveal it. If it isn't a land card, discard it.

In other news, Masters Edition 4 is on Gatherer.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Magic Data

Postby Arch » 26 Nov 2010, 16:41

I'll do an update later this weekend.

One thing I'm wondering about; the last Faerie Dragon option. "Randomly distribute X -0/-1 counters among a random number of creatures chosen at random." It doesn't state what X is and it can't, as far as I can see, not be derived either. Should it be equal to the amount of creatures chosen?
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby Marek14 » 26 Nov 2010, 19:00

That's an option for casting Orcish Catapult. I don't know either how it works, sorry :( My best guess is that some value of X is chosen, but someone would have to test that.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Magic Data

Postby Arch » 27 Nov 2010, 14:06

Updated.

Decided to update the first post instead as it becomes hard to find the links in here when amidst discussions.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby Marek14 » 28 Nov 2010, 09:28

I think you should post the link in both the first post and the last one. First post for people new to this thread, last post for people like me who check it regularly.

EDIT: Basalt Monolith is missing a line break.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

PreviousNext

Return to Magic Rules Engine Programming

Who is online

Users browsing this forum: No registered users and 13 guests


Who is online

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

Login Form