mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
[SNC] Implemented Backstreet Bruiser
This commit is contained in:
parent
a6e9b947b5
commit
bfff3043c0
2 changed files with 72 additions and 0 deletions
71
Mage.Sets/src/mage/cards/b/BackstreetBruiser.java
Normal file
71
Mage.Sets/src/mage/cards/b/BackstreetBruiser.java
Normal file
|
@ -0,0 +1,71 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalAsThoughEffect;
|
||||
import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.Counter;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class BackstreetBruiser extends CardImpl {
|
||||
|
||||
public BackstreetBruiser(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
|
||||
this.subtype.add(SubType.CEPHALID);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
|
||||
// As long as there are two or more counters among creatures you control, Backstreet Bruiser can attack as though it didn't have defender.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalAsThoughEffect(
|
||||
new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
|
||||
BackstreetBruiserCondition.instance
|
||||
).setText("As long as there are two or more counters among creatures you control, {this} can attack as though it didn't have defender")));
|
||||
}
|
||||
|
||||
private BackstreetBruiser(final BackstreetBruiser card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BackstreetBruiser copy() {
|
||||
return new BackstreetBruiser(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum BackstreetBruiserCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int totalCounters = 0;
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_CONTROLLED_CREATURE, source.getControllerId(), source, game)) {
|
||||
for (Counter counter : permanent.getCounters(game).values()) {
|
||||
totalCounters += counter.getCount();
|
||||
if (totalCounters >= 2) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -35,6 +35,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Arc Spitter", 233, Rarity.UNCOMMON, mage.cards.a.ArcSpitter.class));
|
||||
cards.add(new SetCardInfo("Attended Socialite", 133, Rarity.COMMON, mage.cards.a.AttendedSocialite.class));
|
||||
cards.add(new SetCardInfo("Aven Heartstabber", 166, Rarity.RARE, mage.cards.a.AvenHeartstabber.class));
|
||||
cards.add(new SetCardInfo("Backstreet Bruiser", 35, Rarity.COMMON, mage.cards.b.BackstreetBruiser.class));
|
||||
cards.add(new SetCardInfo("Backup Agent", 2, Rarity.COMMON, mage.cards.b.BackupAgent.class));
|
||||
cards.add(new SetCardInfo("Ballroom Brawlers", 3, Rarity.UNCOMMON, mage.cards.b.BallroomBrawlers.class));
|
||||
cards.add(new SetCardInfo("Big Score", 102, Rarity.COMMON, mage.cards.b.BigScore.class));
|
||||
|
|
Loading…
Reference in a new issue