forked from magefree/mage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BLB] Implement Byrke, Long Ear of the Law (magefree#11860)
New common class DoubleCountersTargetEffect
- Loading branch information
1 parent
0ba0062
commit ddcd54c
Showing
10 changed files
with
128 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package mage.cards.b; | ||
|
||
import mage.MageInt; | ||
import mage.abilities.Ability; | ||
import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; | ||
import mage.abilities.common.EntersBattlefieldTriggeredAbility; | ||
import mage.abilities.effects.common.DoubleCountersTargetEffect; | ||
import mage.abilities.effects.common.counter.AddCountersTargetEffect; | ||
import mage.abilities.keyword.VigilanceAbility; | ||
import mage.cards.CardImpl; | ||
import mage.cards.CardSetInfo; | ||
import mage.constants.CardType; | ||
import mage.constants.SubType; | ||
import mage.constants.SuperType; | ||
import mage.counters.CounterType; | ||
import mage.filter.StaticFilters; | ||
import mage.filter.common.FilterControlledCreaturePermanent; | ||
import mage.target.TargetPermanent; | ||
|
||
import java.util.UUID; | ||
|
||
/** | ||
* @author PurpleCrowbar | ||
*/ | ||
public final class ByrkeLongEarOfTheLaw extends CardImpl { | ||
|
||
private static final FilterControlledCreaturePermanent filter = | ||
new FilterControlledCreaturePermanent("creature you control with a +1/+1 counter on it"); | ||
|
||
static { | ||
filter.add(CounterType.P1P1.getPredicate()); | ||
} | ||
|
||
public ByrkeLongEarOfTheLaw(UUID ownerId, CardSetInfo setInfo) { | ||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{W}"); | ||
this.supertype.add(SuperType.LEGENDARY); | ||
this.subtype.add(SubType.RABBIT, SubType.SOLDIER); | ||
this.power = new MageInt(4); | ||
this.toughness = new MageInt(4); | ||
|
||
// Vigilance | ||
this.addAbility(VigilanceAbility.getInstance()); | ||
|
||
// When Byrke, Long Ear of the Law enters, put a +1/+1 counter on each of up to two target creatures. | ||
Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()) | ||
.setText("put a +1/+1 counter on each of up to two target creatures") | ||
); | ||
ability.addTarget(new TargetPermanent(0, 2, StaticFilters.FILTER_PERMANENT_CREATURES)); | ||
this.addAbility(ability); | ||
|
||
// Whenever a creature you control with a +1/+1 counter on it attacks, double the number of +1/+1 counters on it. | ||
this.addAbility(new AttacksCreatureYouControlTriggeredAbility(new DoubleCountersTargetEffect(CounterType.P1P1), false, filter, true)); | ||
} | ||
|
||
private ByrkeLongEarOfTheLaw(final ByrkeLongEarOfTheLaw card) { | ||
super(card); | ||
} | ||
|
||
@Override | ||
public ByrkeLongEarOfTheLaw copy() { | ||
return new ByrkeLongEarOfTheLaw(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.