Page 1 of 1

Proposal for a Winter Orb like keyword

PostPosted: 07 May 2011, 12:45
by Chris H.
I suggested in a topic on the decks forum that we make a Winter Orb like keyword. I found the existing code and it tests for cards by their name and I believe that we are trying to move away from that habit when possible.

The existing code looks like this:

Code: Select all
    private static boolean canOnlyUntapOneLand() {
        CardList orbs = AllZoneUtil.getCardsInPlay("Winter Orb");
        for(Card c : orbs){
            //if any Winter Orb is untapped, effect is on
            if (c.isUntapped())
                return true;
        }

        if (AllZoneUtil.getCardsInPlay("Hokori, Dust Drinker").size() > 0)
            return true;
       
        if (AllZoneUtil.getPlayerCardsInPlay(AllZone.Phase.getPlayerTurn(), "Mungha Wurm").size() > 0)
            return true;
       
        return false;
    }
`
I commented out this code in my local copy and created this new version:

Code: Select all
    private static boolean canOnlyUntapOneLand() {
        CardList orbLikeCards = AllZoneUtil.getCardsInPlay();
        orbLikeCards = orbLikeCards.getKeywordsContain(" can only untap one land.");
       
        if (orbLikeCards.size() > 0) {
           
            for (Card c : orbLikeCards) {
               
                if (c.getKeyword().contains("Both players can only untap one land.")) {
                   
                    if (!c.isArtifact() || (c.isArtifact() && c.isCreature())) {
                        return true;
                    }
                    else {
                        if (c.isUntapped())
                            return true;
                    }
                }
                else if (c.getKeyword().contains("You can only untap one land.")
                        && AllZone.Phase.getPlayerTurn().equals(c.getController())) {
                    return true;
                }
            }
        }
        return false;
    }
`
I also modified the card files for these cards:

card file edits | Open
Name:Hokori, Dust Drinker
ManaCost:2 W W
Types:Legendary Creature Spirit
Text:Players may only untap one land during their untap steps.
PT:2/2
K:Both players can only untap one land.
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/hokori_dust_drinker.jpg
SetInfo:BOK|Rare|http://magiccards.info/scans/en/bok/7.jpg
End

Name:Mungha Wurm
ManaCost:2 G G
Types:Creature Wurm
Text:You can't untap more than one land during your untap step.
PT:6/5
K:You can only untap one land.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/mungha_wurm.jpg
SetInfo:PCY|Rare|http://magiccards.info/scans/en/pr/119.jpg
End

Name:Winter Orb
ManaCost:2
Types:Artifact
Text:As long as Winter Orb is untapped, players can't untap more than one land during their untap steps.
K:Both players can only untap one land.
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/winter_orb.jpg
SetInfo:LEA|Rare|http://magiccards.info/scans/en/al/275.jpg
SetInfo:LEB|Rare|http://magiccards.info/scans/en/be/277.jpg
SetInfo:5ED|Rare|http://magiccards.info/scans/en/5e/408.jpg
SetInfo:4ED|Rare|http://magiccards.info/scans/en/4e/376.jpg
SetInfo:3ED|Rare|http://magiccards.info/scans/en/rv/280.jpg
SetInfo:2ED|Rare|http://magiccards.info/scans/en/un/276.jpg
End

I ran a test with the combo deck that I recently created and this code appears to work correctly.

My main concern at this time is making sure that my code edit is rules compliant and my knowledge is fairly weak in this area.

The Winter Orb ability (static?) is only in effect if this card is untapped. Yet the other two cards do not have this restriction. Is this caused by the fact that the other two cards are creatures and the Winter Orb is not?

How would the Winter Orb be handled if it was animated? Ugh. :mrgreen:

Re: Proposal for a Winter Orb like keyword

PostPosted: 07 May 2011, 13:11
by slapshot5
I think the untapped requirement is just a relic of how things used to be. See Howling Mine vs. Font of Mythos for the same thing. I think static is correct.

I don't see any problem with it being animated. The only thing that matters is tapped vs. untapped.

I'm no rules guru, but that's how I'd look at it.

-slapshot5

Re: Proposal for a Winter Orb like keyword

PostPosted: 07 May 2011, 16:41
by Chris H.
slapshot5 wrote:I think the untapped requirement is just a relic of how things used to be. See Howling Mine vs. Font of Mythos for the same thing. I think static is correct.

I don't see any problem with it being animated. The only thing that matters is tapped vs. untapped.

I'm no rules guru, but that's how I'd look at it.
`
That makes sense now that I think about it ... the "As long as CARDNAME is untapped" restriction is not applied to all artifacts that have a static ability. Some of them have this restriction and others do not.

I should be able to modify the keyword to handle this without too much trouble.

Thank you for the help. :D

Re: Proposal for a Winter Orb like keyword

PostPosted: 07 May 2011, 17:20
by Hellfish
Hokori, Dust Drinker is a triggered, mandatory ability unlike Winter Orb.

Perhaps your work can be refined to support all the 7 "You/Players can't untap more than <number> <type> during your/their untap step" cards? List here:
Code: Select all
http://gatherer.wizards.com/Pages/Search/Default.aspx?text=+[%22can't%20untap%22]

Re: Proposal for a Winter Orb like keyword

PostPosted: 07 May 2011, 19:45
by Sloth
Forget about the untapped clause of Winter Orb: http://www.wizards.com/Magic/Magazine/A ... 41a&page=2

Re: Proposal for a Winter Orb like keyword

PostPosted: 07 May 2011, 23:29
by Chris H.
Hellfish wrote:Hokori, Dust Drinker is a triggered, mandatory ability unlike Winter Orb.

Perhaps your work can be refined to support all the 7 "You/Players can't untap more than <number> <type> during your/their untap step" cards? List here:
Code: Select all
http://gatherer.wizards.com/Pages/Search/Default.aspx?text=+[%22can't%20untap%22]
`
Thanks for the info. I admit that I was never very good at or knowledgable about the game.

I will try to do a more thorough implementation, not sure if it will work or not, but I will at least learn something in the process. :D

Re: Proposal for a Winter Orb like keyword

PostPosted: 07 May 2011, 23:30
by Chris H.
Sloth wrote:Forget about the untapped clause of Winter Orb: http://www.wizards.com/Magic/Magazine/A ... 41a&page=2
`
Wow, thank you Sloth for the heads up.

I will go ahead and make a minor edit to the card file and to the code to bring this card up to date.