Devotion Mechanism and Legendary rule bug

All code submission.
Post Reply
dopple
Posts: 26
Joined: Sat Nov 05, 2011 2:20 pm

Devotion Mechanism and Legendary rule bug

Post by dopple » Thu Sep 05, 2013 12:38 am

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
auto=@each 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
auto=@movedTo(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] 
Attachments

[The extension zip has been deactivated and can no longer be displayed.]


Zethfox
Posts: 3022
Joined: Thu Jun 10, 2010 11:28 pm

Re: Devotion Mechanism and Legendary rule bug

Post by Zethfox » Fri Sep 13, 2013 7:17 pm

devotion needs to be handled separately from "this(". legend rule is a bury, not sacrifice.

dopple
Posts: 26
Joined: Sat Nov 05, 2011 2:20 pm

Re: Devotion Mechanism and Legendary rule bug

Post by dopple » Sat Sep 14, 2013 6:37 pm

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.

Tacoghandi
Posts: 1197
Joined: Thu Apr 28, 2011 11:34 pm

Re: Devotion Mechanism and Legendary rule bug

Post by Tacoghandi » Wed Sep 25, 2013 4:09 pm

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.
!!Check out My Created Sets and other Stuff!!

viewtopic.php?f=22&t=3380

Post Reply