diff --git a/Mage.Sets/src/mage/cards/c/Clamavus.java b/Mage.Sets/src/mage/cards/c/Clamavus.java new file mode 100644 index 0000000000..2aaef8bba3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/Clamavus.java @@ -0,0 +1,76 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; + +import java.util.List; +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Clamavus extends CardImpl { + + public Clamavus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TYRANID); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Proclamator Hailer -- Each creature you control gets +1/+1 for each +1/+1 counter on it. + this.addAbility(new SimpleStaticAbility(new ClamavusEffect()).withFlavorWord("Proclamator Hailer")); + } + + private Clamavus(final Clamavus card) { + super(card); + } + + @Override + public Clamavus copy() { + return new Clamavus(this); + } +} + +class ClamavusEffect extends ContinuousEffectImpl { + + public ClamavusEffect() { + super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); + this.staticText = "each creature you control gets +1/+1 for each +1/+1 counter on it"; + } + + public ClamavusEffect(final ClamavusEffect effect) { + super(effect); + } + + @Override + public ClamavusEffect copy() { + return new ClamavusEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + List permanents = game.getBattlefield().getActivePermanents( + StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game + ); + for (Permanent permanent : permanents) { + int count = permanent.getCounters(game).getCount(CounterType.P1P1); + if (count > 0) { + permanent.addPower(count); + permanent.addToughness(count); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/Warhammer40000.java b/Mage.Sets/src/mage/sets/Warhammer40000.java index fa70328cd1..96d4811865 100644 --- a/Mage.Sets/src/mage/sets/Warhammer40000.java +++ b/Mage.Sets/src/mage/sets/Warhammer40000.java @@ -66,6 +66,7 @@ public final class Warhammer40000 extends ExpansionSet { cards.add(new SetCardInfo("Chromatic Lantern", 232, Rarity.RARE, mage.cards.c.ChromaticLantern.class)); cards.add(new SetCardInfo("Chronomancer", 32, Rarity.RARE, mage.cards.c.Chronomancer.class)); cards.add(new SetCardInfo("Cinder Glade", 269, Rarity.RARE, mage.cards.c.CinderGlade.class)); + cards.add(new SetCardInfo("Clamavus", 90, Rarity.RARE, mage.cards.c.Clamavus.class)); cards.add(new SetCardInfo("Collective Effort", 183, Rarity.RARE, mage.cards.c.CollectiveEffort.class)); cards.add(new SetCardInfo("Command Tower", 270, Rarity.COMMON, mage.cards.c.CommandTower.class)); cards.add(new SetCardInfo("Commander's Sphere", 233, Rarity.COMMON, mage.cards.c.CommandersSphere.class));