Page 1 of 1

Cycling keyword

PostPosted: 24 Sep 2008, 03:49
by Rob Cashwalker
CardFactory :

Similar to how Forge checks for the pump abilities....
Code: Select all
  //Check for Cycling ability
  private final int shouldCycle(Card c)
  {
      ArrayList a = c.getKeyword();
      for (int i = 0; i < a.size(); i++)
          if (a.get(i).toString().startsWith("Cycling"))
              return i;
     
      return -1;
  }
Then use it to instantiate the conveniently pre-fabricated Ability_Cycle.
Code: Select all
    // Cards with Cycling abilities
    // -1 means keyword "Cycling" not found
    if (shouldCycle(card) != -1)
    {
        int n = shouldCycle(card);
        if (n != -1)
        {
            String parse = card.getKeyword().get(n).toString();
            card.removeKeyword(parse);

            String k[] = parse.split(":");
            final String manacost = k[1];

            card.addSpellAbility(CardFactoryUtil.ability_cycle(card, manacost));
    }//Cycling
In cards.txt -
Cardname
Mana
Type
Text
{P/T}
Cycling:G
note - no space around the ":"
The mana cost is extracted directly, so it's formatted in the usual spaced format - "1 G"

This opens up a few more french vanilla creatures. I'll post those cards.txt and such another time.

103 cards have cycling according to Magiccards.info searches.

Re: Cycling keyword

PostPosted: 24 Sep 2008, 12:12
by GandoTheBard
as BDM has said often enough, "Cycling Rocks!"

Re: Cycling keyword

PostPosted: 24 Sep 2008, 14:50
by Rob Cashwalker
GandoTheBard wrote:as BDM has said often enough, "Cycling Rocks!"
Yep, and Shards brings it back!

Re: Cycling Creatures

PostPosted: 25 Sep 2008, 02:12
by Rob Cashwalker
Cards.txt:
Code: Select all
Barkhide Mauler
4 G
Creature Beast
no text
4/4
Cycling:2

Hundroog
6 G
Creature Beast
no text
4/7
Cycling:3

Keeneye Aven
3 U
Creature Bird Soldier
no text
2/3
Flying
Cycling:2

Pendrell Drake
3 U
Creature Drake
no text
2/3
Flying
Cycling:2

Primoc Escapee
6 U
Creature Bird Beast
no text
4/4
Flying
Cycling:2

Sandbar Merfolk
U
Creature Merfolk
no text
1/1
Cycling:2

Sandbar Serpent
4 U
Creature Serpent
no text
3/4
Cycling:2
Commons.txt:
Code: Select all
Barkhide Mauler
Hundroog
Keeneye Aven
Pendrell Drake
Sandbar Merfolk
Uncommon.txt:
Code: Select all
Primoc Escapee
Sandbar Serpent
Card-pics.txt
Code: Select all
Barkhide Mauler         http://resources.wizards.com/Magic/Cards/ONS/en-us/Card34196.jpg
Hundroog            http://resources.wizards.com/Magic/Cards/LGN/en-us/Card42249.jpg
Keeneye Aven         http://resources.wizards.com/Magic/Cards/LGN/en-us/Card35335.jpg
Pendrell Drake         http://resources.wizards.com/Magic/Cards/UZ/en-us/Card5575.jpg
Sandbar Merfolk      http://resources.wizards.com/Magic/Cards/UZ/en-us/Card5815.jpg
Primoc Escapee         http://resources.wizards.com/Magic/Cards/LGN/en-us/Card42437.jpg
Sandbar Serpent      http://resources.wizards.com/Magic/Cards/UZ/en-us/Card9722.jpg

Re: Cycling keyword

PostPosted: 25 Sep 2008, 02:24
by jpb
Someone please implement Lightning Rift. Then we can add some cycling lands and come up with a simple cycling deck.

Re: Cycling Lands

PostPosted: 25 Sep 2008, 02:41
by Rob Cashwalker
Cards.txt:
Code: Select all
Barren Moor
no cost
Land
no text
Comes into play tapped.
tap: add B
Cycling:B

Blasted Landscape
no cost
Land
no text
tap: add 1
Cycling:2

Drifting Meadow
no cost
Land
no text
Comes into play tapped.
tap: add W
Cycling:2

Forgotten Cave
no cost
Land
no text
Comes into play tapped
tap: add R
Cycling:R

Lonely Sandbar
no cost
Land
no text
Comes into play tapped.
tap: add U
Cycling:U

Polluted Mire
no cost
Land
no text
Comes into play tapped.
tap: add B
Cycling:2

Remote Isle
no cost
Land
no text
Comes into play tapped.
tap: add U
Cycling:2

Secluded Steppe
no cost
Land
no text
Comes into play tapped
tap: add W
Cycling:W

Slippery Karst
no cost
Land
no text
Comes into play tapped.
tap: add G
Cycling:2

Smoldering Crater
no cost
Land
no text
Comes into play tapped.
tap: add R
Cycling:2

Tranquil Thicket
no cost
Land
no text
Comes into play tapped.
tap: add G
Cycling:G
Commons.txt:
Code: Select all
Barren Moor
Drifting Meadow
Forgotten Cave
Lonely Sandbar
Polluted Mire
Remote Isle
Secluded Steppe
Slippery Karst
Smoldering Crater
Tranquil Thicket
Uncommons.txt:
Code: Select all
Blasted Landscape
Card-pics.txt:
Code: Select all
Barren Moor      http://resources.wizards.com/Magic/Cards/ONS/en-us/Card41139.jpg
Drifting Meadow   http://resources.wizards.com/Magic/Cards/UZ/en-us/Card5805.jpg
Forgotten Cave      http://resources.wizards.com/Magic/Cards/ONS/en-us/Card41140.jpg
Lonely Sandbar      http://resources.wizards.com/Magic/Cards/ONS/en-us/Card41138.jpg
Polluted Mire      http://resources.wizards.com/Magic/Cards/UZ/en-us/Card5808.jpg
Remote Isle      http://resources.wizards.com/Magic/Cards/UZ/en-us/Card5807.jpg
Secluded Steppe   http://resources.wizards.com/Magic/Cards/ONS/en-us/Card41137.jpg
Slippery Karst      http://resources.wizards.com/Magic/Cards/UZ/en-us/Card5803.jpg
Smoldering Crater   http://resources.wizards.com/Magic/Cards/UZ/en-us/Card5804.jpg
Tranquil Thicket   http://resources.wizards.com/Magic/Cards/ONS/en-us/Card41141.jpg
Blasted Landscape   http://resources.wizards.com/Magic/Cards/UZ/en-us/Card5612.jpg

Re: Cycling keyword

PostPosted: 25 Sep 2008, 02:44
by Rob Cashwalker
jpb wrote:Someone please implement Lightning Rift. Then we can add some cycling lands and come up with a simple cycling deck.
I don't know if you could do that. The ability_cycle would need to be made aware of all possible cards that would care about when a card is cycled. Even the cards themselves... there are a number of cards that say "when this card is cycled, do _____" but that's not going to be done easily.

Re: Cycling keyword

PostPosted: 25 Sep 2008, 02:51
by DennisBergkamp
Yeah lightning rift sounds tricky :(

Great job with the cycling cards, Rob. That adds a boatload of new cards :D

Re: Cycling keyword

PostPosted: 25 Sep 2008, 02:58
by Rob Cashwalker
It's not quite a boat load yet....

I started off doing demographics of various types of spell effects, and found that at the time, there were many cards I couldn't program generically, because they had Cycling or was a cantrip. So I needed these basic elements available to combine with the actual meat of the spells to make the rest of my work worth it.