How to code lord ability ? (Working)

For all your questions regarding Image Card Coding.
Please read the Image Posting Guideline & Index before posting in this forum.
Forum rules
DO NOT POST BUG REPORT IN THIS FORUM !!

Please read carefully the forum rules related to the card coding section : viewtopic.php?f=21&t=1545

All post will be edited to follow forum rules.
Locked
Nelorio12
Posts: 20
Joined: Mon Feb 01, 2010 12:19 pm

How to code lord ability ? (Working)

Post by Nelorio12 »

Can some make a "All other creatures gets +1/+1 and has regenerate"

The +1/+1 is working but not the regenerate

auto=lord(creature[red]|myBattlefield) 1/1 {G}:regenerate other
auto=lord(creature[green]|myBattlefield) 1/1 {G}:regenerate other
auto=lord(creature[blue]|myBattlefield) 1/1 {G}:regenerate other
auto=lord(creature[white]|myBattlefield) 1/1 {G}:regenerate other
auto=lord(creature[black]|myBattlefield) 1/1 {G}:regenerate other

What's wrong with the code

[EDIT ABRA: renamed topic]
arcaneous
Posts: 124
Joined: Sun Nov 08, 2009 4:49 pm

Re: Help in coding an ability pls.

Post by arcaneous »

i think the problem maybe you need to lord the 2 seprately

like field marshal;

[card]
name=Field Marshal
auto=lord(soldier) 1/1 other
auto=lord(soldier) first strike other
text=Other Soldier creatures get +1/+1 and have first strike. (They deal combat damage before creatures without first strike.)
mana={1}{W}{W}
type=Creature
subtype=Human Soldier
power=2
toughness=2
[/card]

so you need

auto=lord(creature[red]|myBattlefield) 1/1 other
auto=lord(creature[red]|myBattlefield) {G}:regenerate other
auto=lord(creature[green]|myBattlefield) 1/1 other
auto=lord(creature[green]|myBattlefield) {G}:regenerate other
auto=lord(creature[blue]|myBattlefield) 1/1 other
auto=lord(creature[blue]|myBattlefield) {G}:regenerate other
auto=lord(creature[white]|myBattlefield) 1/1
auto=lord(creature[white]|myBattlefield) {G}:regenerate other
auto=lord(creature[black]|myBattlefield) 1/1 other
auto=lord(creature[black]|myBattlefield) {G}:regenerate other

this should work the way you wanted. but i think this is better if you wanted "All other creatures you control gain +1/+1 and "{G}: Regenerate"" it would be better and faster as

auto=lord(creature|myBattlefield) 1/1 other
auto=lord(creature|myBattlefield) {G}:regenerate other

hope that helps.
wololo
Site Admin
Posts: 3728
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Help in coding an ability pls.

Post by wololo »

arcaneous+1
also,

auto=lord(other creature|myBattlefield) 1/1
auto=lord(other creature|myBattlefield) {G}:regenerate

is even more readable and is the new way of doing things ;)
Nelorio12
Posts: 20
Joined: Mon Feb 01, 2010 12:19 pm

Re: Help in coding an ability pls.

Post by Nelorio12 »

Thx! It worked and the code is shorter :)
Psyringe
Posts: 1163
Joined: Mon Aug 31, 2009 10:53 am

Re: Help in coding an ability pls.

Post by Psyringe »

There's a functional difference: Your code would not effect non-colored artifact creatures, while wololo's code will. From your description I'd say that you want the latter (and wololo's code therefore also fixes this problem of the previous code), but I'm mentioning it in case I guessed wrong.
Locked