Goblin Piledriver (Working & Added)

Card coding that have been confirmed working and added to the SVN are moved in this forum. Do not post here.
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Goblin Piledriver - Requires Confirmation

Post by Dr.Solomat »

Th1rte3n wrote:Has anyone else actually tested the code I posted? Pretty sure it works 100% (power returns to normal when they are not attacking) and it would be awesome to see piledriver in wagic since he's one of the best goblins :)

we have a lot to do these days. why don't you test it by yourself? ;)
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Th1rte3n
Posts: 44
Joined: Mon Jun 28, 2010 11:13 pm

Re: Goblin Piledriver - Requires Confirmation

Post by Th1rte3n »

Dr.Solomat wrote: we have a lot to do these days. why don't you test it by yourself? ;)
Ok, I went and tested it more just to be absolutely sure and I did find a problem. His buff is supposed to be until end of turn, but the way I have it coded it only buffs him until the end of combat. This can cause a problem if you attack against creatures with first strike, because the first strike damage can kill one of your goblins, reducing piledriver's attack power when it shouldn't. I'll see if I can fix this!
Th1rte3n
Posts: 44
Joined: Mon Jun 28, 2010 11:13 pm

Re: Goblin Piledriver - Requires Confirmation

Post by Th1rte3n »

Ok I think I have a fix:

Code: Select all

[card]
name=Goblin Piledriver
abilities=protection from blue
auto=@each myblockers:lord(goblin piledriver[attacking]|myBattlefield) foreach(other goblin[attacking]|myBattlefield) 2/0 ueot oneshot
auto=@each myblockers:lord(goblin piledriver[attacking]|myBattlefield) foreach(other goblin[attacking]|myBattlefield) -2/0 other ueot oneshot
mana={1}{R}
type=Creature
subtype=Goblin Warrior
power=1
toughness=2
[/card]
The only problem now is it's really ugly, and their power goes crazy from the abilities not triggering simultaneously...this is a result of each one not just buffing himself, but buffing all attacking piledrivers then debuffing all other attacking piledrivers. But once all the buffing/debuffing resolves, all piledrivers have the correct power, return to their correct power when the turn is over, and power up correctly on future attacks. Another small problem is that the ability triggers on your blockers phase even when piledriver isn't attacking, although it obviously does nothing.

So overall, this implementation is slightly more correct than the previous code I posted; I believe it is now truly working 100%. The problem is that if you have more than one Piledriver attacking, the resulting abilities triggering and power adjustments look ugly. But it works.
lozanogo
Posts: 81
Joined: Wed Aug 25, 2010 6:48 am

Re: Goblin Piledriver - Requires Confirmation

Post by lozanogo »

Have you tried to correct it by replacing this segment:
goblin piledriver[attacking]

with this one:
this[attacking] ??
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Goblin Piledriver - Requires Confirmation

Post by Dr.Solomat »

Goblin PIledriver is codable now due to Zeth's huge update on rev2444.

Note that you can only play it if you are playing with rev2444 or higher. In the last official release - Wagic 0.13.1 - Piledriver won't work.


[card]
name=Goblin Piledriver
abilities=protecion from blue
auto=@attacking(this):all(this) foreach(other goblin[attacking]|battlefield) 2/0 ueot
text=Protection from blue -- Whenever Goblin Piledriver attacks, it gets +2/+0 until end of turn for each other attacking Goblin.
mana={1}{R}
type=Creature
subtype=Goblin Warrior
power=1
toughness=2
[/card]
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Locked