Skip to content

Commit

Permalink
[WHO] Implement Cybermat
Browse files Browse the repository at this point in the history
  • Loading branch information
theelk801 committed Oct 13, 2023
1 parent ff745d4 commit 680a81b
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
61 changes: 61 additions & 0 deletions Mage.Sets/src/mage/cards/c/Cybermat.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package mage.cards.c;

import mage.MageInt;
import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.SkulkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterArtifactCreaturePermanent;
import mage.filter.predicate.permanent.AttackingPredicate;

import java.util.UUID;

/**
* @author TheElk801
*/
public final class Cybermat extends CardImpl {

private static final FilterPermanent filter = new FilterArtifactCreaturePermanent("attacking artifact creatures");

static {
filter.add(AttackingPredicate.instance);
}

private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, null);
private static final Hint hint = new ValueHint("Attacking artifact creatures", xValue);

public Cybermat(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}");

this.subtype.add(SubType.ROBOT);
this.power = new MageInt(2);
this.toughness = new MageInt(1);

// Skulk
this.addAbility(new SkulkAbility());

// Whenever Cybermat attacks and isn't blocked, it gets +X/+0 until end of turn, where X is the number of attacking artifact creatures.
this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(
new BoostSourceEffect(xValue, StaticValue.get(0), Duration.EndOfTurn, "it")
).addHint(hint));
}

private Cybermat(final Cybermat card) {
super(card);
}

@Override
public Cybermat copy() {
return new Cybermat(this);
}
}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/DoctorWho.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ private DoctorWho() {
cards.add(new SetCardInfo("Cultivate", 230, Rarity.COMMON, mage.cards.c.Cultivate.class));
cards.add(new SetCardInfo("Cursed Mirror", 226, Rarity.RARE, mage.cards.c.CursedMirror.class));
cards.add(new SetCardInfo("Cyberman Patrol", 174, Rarity.UNCOMMON, mage.cards.c.CybermanPatrol.class));
cards.add(new SetCardInfo("Cybermat", 175, Rarity.UNCOMMON, mage.cards.c.Cybermat.class));
cards.add(new SetCardInfo("Cybermen Squadron", 176, Rarity.RARE, mage.cards.c.CybermenSquadron.class));
cards.add(new SetCardInfo("Dalek Drone", 64, Rarity.RARE, mage.cards.d.DalekDrone.class));
cards.add(new SetCardInfo("Dalek Squadron", 65, Rarity.UNCOMMON, mage.cards.d.DalekSquadron.class));
Expand Down

0 comments on commit 680a81b

Please sign in to comment.