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]