It is currently 27 Apr 2024, 06:07
   
Text Size

Basic Snow Lands & rarity rating "L"

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Basic Snow Lands & rarity rating "L"

Postby Chris H. » 27 Dec 2009, 01:41

I have a question for Dennis.

When you released the 02-24 beta version it included a revised deck editor. In this version the rarity values for cards appeared and Basic Lands were given the rating "L".

I have looked through the code and I can't find where the rating "L" is assigned as a rarity for the Basic Lands. Can you clue me in? :oops:

I would like to add in the Basic Snow Lands to the list of cards which get an "L". I am also considering modifying the card pool distribution for quest mode. I think that it might be nice if half of the Basic Lands we receive are Basic Snow Lands.

Zerker and Sloth did a good job adding in the snow mana code and cards. I don't want these cards to go to waste. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Basic Snow Lands & rarity rating "L"

Postby Marek14 » 27 Dec 2009, 08:45

Chris H. wrote:I have a question for Dennis.

When you released the 02-24 beta version it included a revised deck editor. In this version the rarity values for cards appeared and Basic Lands were given the rating "L".

I have looked through the code and I can't find where the rating "L" is assigned as a rarity for the Basic Lands. Can you clue me in? :oops:

I would like to add in the Basic Snow Lands to the list of cards which get an "L". I am also considering modifying the card pool distribution for quest mode. I think that it might be nice if half of the Basic Lands we receive are Basic Snow Lands.

Zerker and Sloth did a good job adding in the snow mana code and cards. I don't want these cards to go to waste. :)
Could the code be set up like this?
There is defined a set of cards that want you to play with snow lands. These are:
1. Snow mana users (Adarkar Windform, Boreal Centaur, Boreal Griffin, Chilling Shade, Cover of Winter, Diamond Faerie, Frost Raptor, Gelid Shackles, Glacial Plating, Goblin Rimerunner, Mouth of Ronom, Ohran Yeti, Phyrexian Ironfoot, Phyrexian Snowcrusher, Rime Transfusion, Rimebound Dead, Rimefeather Owl, Rimehorn Aurochs, Rimescale Dragon, Scrying Sheets, Stalking Yeti, Thermopod and Zombie Musher)
2. Cards that generally benefit from snow (Balduvian Conjurer, Blizzard, Drift of the Dead, Gangrenous Zombies, Gargantuan Gorilla, Glacial Crevasses, Goblin Ski Patrol, Heidar, Rimewind Master; Into the North, Karplusan Giant, Rimewind Cryomancer, Rimewind Taskmage, Ronom Serpent, Skred, Snow Devil, Snowfall, Storm Elemental, Sunstone, Viscerid Drone, Whiteout, Winter's Chill, Winter's Night, Withering Wisps and Woolly Mammoths)

There are also some cards that specifically DON'T want to be played in a snow deck (Cold Snap, Freyalise's Radiance, Hallowed Ground and Melting).

So, how about making new category of random decks, the theme decks?

The snow deck would be an example. All its lands would be snow, and 50% of nonland cards would be the snow-benefitters (Boreal Druid and Coldsteel Heart should be probably added to the list).

Moreover, I suggest a syntax that would allow users to define their own theme decks. They would look like a text file looking like this:

COLORS
<combination>
<combination>
...

CARD
number

<cardname>
<cardname>
...

CARD
number

<cardname>
<cardname>
<cardname>
...

EXCLUDED
<cardname>
<cardname>
<cardname>
...

OTHER LANDS
number

OTHER CARDS
number

The effect is this:
1. A color or colors of the deck are selected by randomly choosing one of the entries in COLORS. Only cards belonging to these colors (or colorless) will be further considered. In addition, any further card in the file can have its colors specified, which overrides its innate color. For example, Boggart Ram-Gang can be written as "Boggart Ram-Gang | R G" which says it can be used in any red OR green deck, and Adarkar Wastes can have "Adarkar Wasters | WU" meaning it will be ONLY used in a deck that is both white and blue.
1. For each CARD block, choose specified number of cards from the block (maximum of 4 copies. If the number is higher than 4*number of eligible cards, then 4 copies of each are added, then the process is repeated (if the number is STILL higher, further 4 copies of each are added etc.)). Ideally, this should take into account that there might be yet-unimplemented card entries. First, the list is parsed to eliminate unimplemented cards and cards with wrong color definition, then cards are selected from it.
2. The OTHER LANDS block will select specific number of random additional lands (conforming to the colors, if possible).
3. The OTHER CARDS block will select specific number of random additional nonland cards (conforming to the colors).
In these two blocks, EXCLUDED cards are not allowed to be chosen.

This structure could be adapted to any number of themes (Goblin decks, artifact decks, block decks, prismatic decks, etc.) and is somewhere halfway between purely random and constructed game.

EDIT: Of course, if you wish a theme to use ONLY cards from some approved list, you wouldn't put all the rest into EXCLUDED - you would just set the OTHER fields as zero.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Basic Snow Lands & rarity rating "L"

Postby Chris H. » 27 Dec 2009, 12:08

Currently, the system for creating random decks and random card pools/boosters is fairly limited and simple. I seem to remember a recent 2 color random deck having a card that needed snow mana to pump and I only had non-snow land in play.

Dennis recently added a feature for creating random 3 color and 5 color decks. I have tried this out a few times and have enjoyed the experience. It is an interesting variation.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Basic Snow Lands & rarity rating "L"

Postby DennisBergkamp » 27 Dec 2009, 21:58

It appears to be done in ReadBoosterPack.getRarity():

Code: Select all
public String getRarity(String cardName) {
        if(commonList.containsName(cardName)) return "Common";
        if(uncommonList.containsName(cardName)) return "Uncommon";
        if(rareList.containsName(cardName)) return "Rare";
       
        ArrayList<String> land = new ArrayList<String>();
        land.add("Forest");
        land.add("Plains");
        land.add("Swamp");
        land.add("Mountain");
        land.add("Island");
        land.add("Terramorphic Expanse");
        if(land.contains(cardName)) return "Land";
       
        return "error";
    }
So I guess you'll have to be sure the snowlands are not in the common/uncommon/rare list, and then just add
land.add("Snow-Covered Forest");
land.add("Snow-Covered Plains");
land.add("Snow-Covered Swamp");
...
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Snow Lands & rarity rating "L"

Postby DennisBergkamp » 27 Dec 2009, 22:09

I think the "Theme deck" idea is a really good idea. Since there are so many combos, we could easily make quite a large amount of possibilities to generate these more interesting decks from... currently the randomly generated decks are just boring.

Then again, writing some parser for text files in such a format could be quite a bit of work :(
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Snow Lands & rarity rating "L"

Postby Chris H. » 27 Dec 2009, 22:11

Hmm, yeah, I saw this section of code and felt that it could be what I was looking for ... I will try it and we will see if it works. :wink: Thank you.

I will also add in some code to make snow lands appear in quest and 2 color random decks.

I have played your 3 and 5 color random decks on several occasions, and enjoyed it ... a nice addition. It may not be possible to add these snow lands to the these two types of random decks.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Basic Snow Lands & rarity rating "L"

Postby Chris H. » 28 Dec 2009, 00:22

I tried it and it works. I can now see why I was confused. Those lands were not given a "L" or a 'L' and instead they are given a rarity of "Land". As such, my search for a single char did not find this section. :D

It now makes sense, the deck editor only displays the first character of the rarity string. A big double Doh!
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Basic Snow Lands & rarity rating "L"

Postby Rob Cashwalker » 28 Dec 2009, 01:03

I think the text-based generation would be advantageous. Think about it - translate the card-inclusion/exclusion rules for generating random decks that we have now into some sort of text-based list. So we'd have a 2-color rule file, a 3 color rule file, a 5 color rule file, a snow-inclusive rule file, a goblin rule file, an elf rule file, etc....
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Basic Snow Lands & rarity rating "L"

Postby Marek14 » 28 Dec 2009, 07:29

This ties into an older idea of mine, which was to give every card a string detailing what color of decks are allowed to play it. I even made such a list and sent it to mtgrares, but never heard about it :)

The default rule would be that card can be included in decks that include all of its colors, but there would be some major exceptions:

1. Hybrid cards could be used in decks using either of their color, not both.
2. Cards which require off-color mana would have those colors required (i.e. Thunderscape Apprentice would be only playable in decks playing B, R and G and Paragon of the Amesha would require 5-color deck).
3. Cards that take general advantage from other colors would have specific requirements (i.e. Quirion Dryad would require at least two-color deck and Mirror-Sigil Sergeant would require both W and U).
4. Domain cards would require five-color deck.

Snow might count as a color for these purposes.

As for lands, my rule would be that lands producing two or more colors would require a deck that can use at least two of those colors. Otherwise, they would be generally worse than basic lands (i.e. the rule "you wouldn't play City of Brass in a monocolor deck").

And I just had to update the list to current version... for some reason.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Basic Snow Lands & rarity rating "L"

Postby Chris H. » 28 Dec 2009, 11:50

Marek14 wrote:This ties into an older idea of mine, which was to give every card a string detailing what color of decks are allowed to play it. I even made such a list and sent it to mtgrares, but never heard about it :)
`
Dennis recently added an option to "Generate 5-Color Gold Deck" at the New Game Window. I have played this option several times and have enjoyed the experience.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Basic Snow Lands & rarity rating "L"

Postby Marek14 » 28 Dec 2009, 12:24

Chris H. wrote:
Marek14 wrote:This ties into an older idea of mine, which was to give every card a string detailing what color of decks are allowed to play it. I even made such a list and sent it to mtgrares, but never heard about it :)
`
Dennis recently added an option to "Generate 5-Color Gold Deck" at the New Game Window. I have played this option several times and have enjoyed the experience.
Yes, but that's only gold cards. I want an option where absolutely ANY card could show up.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Basic Snow Lands & rarity rating "L"

Postby Chris H. » 29 Dec 2009, 02:42

The deck editors will now list the snow-covered basic lands as having a rarity of L.

The starting card pools for quest mode and sealed deck now contains only 20 each of the 5 Basic Lands (rather than the original 40) and an additional 20 each of the 5 new Snow-Covered Basic Lands.

8)


I have not changed the code which creates random 2, 3 or 5 color decks. I have decided that for the moment I will get busy with other areas of development ... I am not sure how we should handle the random constructed decks at this time. :?
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Basic Snow Lands & rarity rating "L"

Postby mtgrares » 30 Dec 2009, 18:13

DennisBergkamp wrote: currently the randomly generated decks are just boring.
The randomly generated decks really need to have a mana curve. The generated decks are checked to ensure that you have lots of creatures.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 87 guests


Who is online

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

Login Form