Page 1 of 1

Amulet of Vigor

PostPosted: 22 Jan 2010, 05:22
by Incantus
I was reading the spoiler for Worldwake's Amulet of Vigor today (http://www.wizards.com/Magic/Magazine/Article.aspx?x=mtg/daily/ftl/74) and I realized it was a good test to see if comes-into-play replacement effects interacted properly with triggered abilities. So I implemented the card without any special changes, and lo and behold it works as specified. So this is a little mini-throwdown to the other rules engines out there - could you implement this card without any special cases and have it work correctly in your engines? In case you were wondering, this is how it looks in Incantus:

Code: Select all
name = 'Amulet of Vigor'
cost = '1'
types = Artifact
text = ['Whenever a permanent enters the battlefield tapped and under your control, untap it']

#################################

@triggered(EnterTrigger("battlefield"), txt=text[0])
def ability():
    # condition
    def condition(source, card):
        return card.tapped and card.controller == source.controller
    # effects
    def effects(controller, source, card):
        target = yield NoTarget()
        # Code for effect
        card.untap()
        yield
    return condition, effects
abilities.add(ability)
It almost reads like the card :)

Re: Amulet of Vigor

PostPosted: 22 Jan 2010, 19:44
by juzamjedi
Looking at the spoiler so far it seems like there would be a number of challenges with the current engine. The biggest challenge from this set seems to be cost modifiers. Here are the cards I saw that looked the most problematic to me:

Eye of Ugin
Lodestone Golem
Abyssal Persecutor
Quest for the Nihil Stone
Trap cards - especially Ricochet Trap
The multi-kicker cards

Re: Amulet of Vigor

PostPosted: 24 Jan 2010, 18:48
by nantuko84
I've just tried it in MagicWars this way:

Code: Select all
name = "Amulet of Vigor"
manacost = "1"
types = [ "Artifact" ]
text = ["Whenever a permanent enters the battlefield tapped and under your control, untap it"]

prints = [
   ["WWK", "R", 3, 121]
]

script = '''\
   addAbilityTriggered(
      text:text[0],
      effect:{
         untap($card)
      },
      condition: {
         $card.tapped && $card.controller == $this.controller
      },
      trigger: "@moveToZone,from=Any,to=Battlefield"
   )

'''
looks pretty the same, but doesn't work for me ;(
it is because first permanent triggers the effect that should tap it, and then Amulet of Vigor checks this permanent for being tapped. but as tapping wasn't resolved at this moment, Amulet does nothing.

how do you handle this?

Re: Amulet of Vigor

PostPosted: 24 Jan 2010, 21:58
by Marek14
nantuko84 wrote:I've just tried it in MagicWars this way:

Code: Select all
name = "Amulet of Vigor"
manacost = "1"
types = [ "Artifact" ]
text = ["Whenever a permanent enters the battlefield tapped and under your control, untap it"]

prints = [
   ["WWK", "R", 3, 121]
]

script = '''\
   addAbilityTriggered(
      text:text[0],
      effect:{
         untap($card)
      },
      condition: {
         $card.tapped && $card.controller == $this.controller
      },
      trigger: "@moveToZone,from=Any,to=Battlefield"
   )

'''
looks pretty the same, but doesn't work for me ;(
it is because first permanent triggers the effect that should tap it, and then Amulet of Vigor checks this permanent for being tapped. but as tapping wasn't resolved at this moment, Amulet does nothing.

how do you handle this?
Incantus has replacement effects - the permanent already enters the battlefield tapped, which doesn't use stack. Amulet is only triggered by permanents that were never on the battlefield untapped.

Re: Amulet of Vigor

PostPosted: 28 Jan 2010, 00:51
by nantuko84
I didn't know that "~ enters onto battlefield tapped" doesn't use the stack.
once it was changed in MW, Amulet of Vigor started to work ;) thanks