Page 1 of 1

Devotion Mechanism and Legendary rule bug

Posted: Thu Sep 05, 2013 12:38 am
by dopple
I was trying to put devotion mechanism into wagic and during testing devotion mechanism found a bug.
If legendary permanent has indestructible, it won't go to graveyard when a permanent with same name enters the battlefield.

Cards that using devotion mechanism coded like below.
I attached diff and test code and i hoping someone review this codes. Thanks.

Code: Select all

[card]
name=Heliod, God of the Sun
mana={3}{W}
type=Legendary Enchantment Creature
subtype=God
abilities=indestructible
auto=this(variable{devotiontowhite} >4)while transforms((removetypes)) forever && transforms((Legendary Enchantment Creature God)) forever
auto=this(variable{devotiontowhite} <5)while transforms((removetypes)) forever && transforms((Legendary Enchantment God)) forever
auto=lord(creature|mybattlefield) vigilance
auto={2}{W}{W}:token(Cleric, Creature Cleric, 2/1,white)
power=5
toughness=6
[/card] 

[card]
name=Master of Waves
mana={3}{U}
type=Creature
subtype=Merfolk Wizard
auto=lord(creature[elemental]|mybattlefield) 1/1
auto=token(Elemental, Creature Elemental, 1/0, blue)*devotiontoblue
power=2
toughness=1
[/card]

[card]
name=Thassa, God of the Sea
mana={2}{U}
type=Legendary Enchantment Creature
subtype=God
abilities=indestructible
auto=this(variable{devotiontowhite} >4)while transforms((removetypes)) forever && transforms((Legendary Enchantment Creature God)) forever
auto=this(variable{devotiontowhite} <5)while transforms((removetypes)) forever && transforms((Legendary Enchantment God)) forever
#auto=scry1
auto={1}{U}:target(creature|mybattlefield) unblockable
power=5
toughness=5
[/card] 

[card]
name=Abhorrent Overlord
mana={5}{B}{B}
type=Creature
subtype=Demon
abilities=flying
auto=token(Harpy, Creature Harpy,1/1,black,flying)*devotiontoblack
[email protected] my upkeep:sacrifice notatarget(creature|mybattlefield)
power=6
toughness=6
[/card]

[card]
name=Gray Merchant of Asphodel
mana={3}{B}{B}
type=Creature
subtype=Zombie
auto=life:-devotiontoblack all(opponent) && life:devotiontoblack controller
power=2
toughness=4
[/card]

[card]
name=Purphoros, God of the Forge
mana={3}{R}
type=Legendary Enchantment Creature
subtype=God
abilities=indestructible
auto=this(variable{devotiontored} >4)while transforms((removetypes)) forever && transforms((Legendary Enchantment Creature God)) forever
auto=this(variable{devotiontored} <5)while transforms((removetypes)) forever && transforms((Legendary Enchantment God)) forever
[email protected](creature|mybattlefield): damage:2 all(opponent)
auto={R}:all(creature|mybattlefield) 1/0
power=6
toughness=5
[/card]

[card]
name=Nylea, God of the Hunt
mana={3}{G}
type=Legendary Enchantment Creature
subtype=God
abilities=indestructible
auto=this(variable{devotiontogreen} >4)while transforms((removetypes)) forever && transforms((Legendary Enchantment Creature God)) forever
auto=this(variable{devotiontogreen} <5)while transforms((removetypes)) forever && transforms((Legendary Enchantment God)) forever
auto=lord(creature|mybattlefield) trample
auto={3}{G}:target(creature) 2/2 ueot
power=6
toughness=6
[/card] 

[card]
name=Reverent Hunter
mana={3}{G}
type=Creature
subtype=Human Archer
auto=counter(1/1,devotiontogreen)
power=1
toughness=1
[/card] 

Re: Devotion Mechanism and Legendary rule bug

Posted: Fri Sep 13, 2013 7:17 pm
by Zethfox
devotion needs to be handled separately from "this(". legend rule is a bury, not sacrifice.

Re: Devotion Mechanism and Legendary rule bug

Posted: Sat Sep 14, 2013 6:37 pm
by dopple
Hmm, maybe we need other ability that ignoring indestructible. Even if legendary permanent has indestructible, it goes graveyard when permanent that has same name enters the battlefield.

Re: Devotion Mechanism and Legendary rule bug

Posted: Wed Sep 25, 2013 4:09 pm
by Tacoghandi
Zethfox wrote:devotion needs to be handled separately from "this(". legend rule is a bury, not sacrifice.
I am assuming you mean the legendary rule in the game is coded as bury.

The legend rule in mtg is simply a move action. The legend rules states that the chosen legendary permanent stays and the other is put into its owner's graveyard.

Just a heads up.