It is currently 16 Apr 2024, 19:41
   
Text Size

Amulet of Vigor

by Incantus

Moderator: CCGHQ Admins

Amulet of Vigor

Postby Incantus » 22 Jan 2010, 05:22

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 :)
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: Amulet of Vigor

Postby juzamjedi » 22 Jan 2010, 19:44

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
juzamjedi
Tester
 
Posts: 575
Joined: 13 Nov 2008, 08:35
Has thanked: 6 times
Been thanked: 8 times

Re: Amulet of Vigor

Postby nantuko84 » 24 Jan 2010, 18:48

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?
nantuko84
DEVELOPER
 
Posts: 266
Joined: 08 Feb 2009, 21:14
Has thanked: 2 times
Been thanked: 9 times

Re: Amulet of Vigor

Postby Marek14 » 24 Jan 2010, 21:58

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.
Marek14
Tester
 
Posts: 2759
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: Amulet of Vigor

Postby nantuko84 » 28 Jan 2010, 00:51

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
nantuko84
DEVELOPER
 
Posts: 266
Joined: 08 Feb 2009, 21:14
Has thanked: 2 times
Been thanked: 9 times


Return to Incantus

Who is online

Users browsing this forum: No registered users and 14 guests


Who is online

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

Login Form