Implemented Zagoth Mamba

This commit is contained in:
Evan Kranzler 2020-04-02 17:16:42 -04:00
parent 6d8e78f07f
commit aa1a3b3353
3 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,42 @@
package mage.cards.z;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.MutatesSourceTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetOpponentsCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ZagothMamba extends CardImpl {
public ZagothMamba(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
this.subtype.add(SubType.NIGHTMARE);
this.subtype.add(SubType.SNAKE);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Whenever this creature mutates, target creature an opponent controls gets -2/-2 until end of turn.
Ability ability = new MutatesSourceTriggeredAbility(new BoostTargetEffect(-2, -2));
ability.addTarget(new TargetOpponentsCreaturePermanent());
this.addAbility(ability);
}
private ZagothMamba(final ZagothMamba card) {
super(card);
}
@Override
public ZagothMamba copy() {
return new ZagothMamba(this);
}
}

View file

@ -35,5 +35,6 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
cards.add(new SetCardInfo("Sprite Dragon", 382, Rarity.UNCOMMON, mage.cards.s.SpriteDragon.class));
cards.add(new SetCardInfo("Titanoth Rex", 377, Rarity.UNCOMMON, mage.cards.t.TitanothRex.class));
cards.add(new SetCardInfo("Void Beckoner", 373, Rarity.UNCOMMON, mage.cards.v.VoidBeckoner.class));
cards.add(new SetCardInfo("Zagoth Mamba", 106, Rarity.UNCOMMON, mage.cards.z.ZagothMamba.class));
}
}

View file

@ -0,0 +1,47 @@
package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
/**
* @author TheElk801
*/
public class MutatesSourceTriggeredAbility extends TriggeredAbilityImpl {
public MutatesSourceTriggeredAbility(Effect effect) {
this(effect, false);
}
public MutatesSourceTriggeredAbility(Effect effect, boolean optional) {
super(Zone.BATTLEFIELD, effect, optional);
}
private MutatesSourceTriggeredAbility(final MutatesSourceTriggeredAbility ability) {
super(ability);
}
@Override
public MutatesSourceTriggeredAbility copy() {
return new MutatesSourceTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
// TODO: implement this
return false;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
// TODO: implement this
return false;
}
@Override
public String getRule() {
return "Whenever this creature mutates, " + super.getRule();
}
}