This is another patch by the great newcomer salmelo.
Salmelo:"Here is another patch, this time adding counters to target specifications, so now you should be able to target things with counters on them as well as use counters for criterion for Lord, aslongas, foreach, etc.
I had to muddle the syntax a little bit though, so heres an example, taken from gwafa hazid, whom I added to the primitives to test with.
lord(creature[counter{0/0.1.Bribe}]|opponentbattlefield) cantattack
obviously the part we are worried about is the counter part, note that those are curly braces { } and periods . instead of parentheses ( ) and commas , this is so that it does not conflict with how targets are normally parsed, which it did before I changed those. Counters still work the same way everywhere else though, you only need to use { } and periods in target code.
Also, you can use counter{any} to specify that it should look for things with any kind of counter on them, not just specific ones, this is used by Kulrath Knight, for example.
I also consolidated most of the code used to parse counter specifications, as it seemed unnecessary duplicating it three times.
Anyway, aside from this major addition, I also added Gwafa Hazid, Profiteer; and Kulrath Knight to the primitives, as well as a test file for each to make sure it worked.
Hopefully y'all will find this patch useful.
Oh, and I should point out that it only works with one Counter in the target specification, i imagine if you put two in the same one then it would either overwrite the first with the second or merge them into some sort of hybrid counter monstrosity, either way, I wouldn't suggest it. "
Cards with vanishing are also codable now. Have a look at the comments for explanation.
daily_build.
This commit is contained in:
@@ -2281,6 +2281,21 @@ power=2
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Aven Riftwatcher
|
||||
abilities=flying
|
||||
auto=counter(0/0,3,Time)
|
||||
auto=life:2
|
||||
auto=@movedTo(this|exile,graveyard,hand,library) from(myBattlefield):life:2
|
||||
auto=@each my upkeep:counter(0/0,-1,Time)
|
||||
auto=lord(aven riftwatcher[-counter{0/0.1.Time}]|myBattlefield) -99/-99
|
||||
text=Flying -- Vanishing 3 (This permanent enters the battlefield with three time counters on it. At the beginning of your upkeep, remove a time counter from it. When the last is removed, sacrifice it.) -- When Aven Riftwatcher enters the battlefield or leaves the battlefield, you gain 2 life.
|
||||
mana={G}
|
||||
type=Creature
|
||||
subtype=Bird rebel Soldier
|
||||
power=2
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Aven Smokeweaver
|
||||
abilities=flying,protection from red
|
||||
text=Flying, protection from red
|
||||
@@ -16905,6 +16920,18 @@ mana={RG}
|
||||
type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Gwafa Hazid, Profiteer
|
||||
mana={1}{W}{U}
|
||||
type=Creature
|
||||
subtpe=Legendary Human Rogue
|
||||
text={W}{U}, {T}: Put a bribery counter on target creature you don't control. Its controller draws a card. -- Creatures with bribery counters on them can't attack or block.
|
||||
power=2
|
||||
toughness=2
|
||||
auto={W}{U}{T}:counter(0/0,1,Bribe) target(creature|opponentbattlefield) && draw:1
|
||||
auto=lord(creature[counter{0/0.1.Bribe}]) cantattack
|
||||
auto=lord(creature[counter{0/0.1.Bribe}]) cantblock
|
||||
[/card]
|
||||
[card]
|
||||
name=Gwendlyn Di Corci
|
||||
auto={T}:discard:1 target(player) myTurnOnly
|
||||
text={T}: Target player discards a card at random. Activate this ability only during your turn.
|
||||
@@ -21548,6 +21575,18 @@ type=Enchantment
|
||||
subtype=Aura
|
||||
[/card]
|
||||
[card]
|
||||
name=Kulrath Knight
|
||||
mana={3}{BR}{BR}
|
||||
power=3
|
||||
toughness=3
|
||||
type=Creature
|
||||
subtype=Elemental Knight
|
||||
abilities=flying,wither
|
||||
text=Flying -- Wither (This deals damage to creatures in the form of -1/-1 counters.) -- Creatures your opponents control with counters on them can't attack or block.
|
||||
auto=lord(creature[counter{any}]|opponentbattlefield) cantattack
|
||||
auto=lord(creature[counter{any}]|opponentbattlefield) cantblock
|
||||
[/card]
|
||||
[card]
|
||||
name=Kurgadon
|
||||
auto=@movedTo(creature[manacost>=6]|mystack):counter(1/1,3)
|
||||
text=Whenever you cast a creature spell with converted mana cost 6 or more, put three +1/+1 counters on Kurgadon.
|
||||
|
||||
Reference in New Issue
Block a user