Implemented Haazda Officer

This commit is contained in:
Evan Kranzler 2019-01-11 15:09:57 -05:00
parent 155aa5ed03
commit f239e8dd44
3 changed files with 52 additions and 5 deletions

View file

@ -0,0 +1,42 @@
package mage.cards.h;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
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.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HaazdaOfficer extends CardImpl {
public HaazdaOfficer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// When Haazda Officer enters the battlefield, target creature you control gets +1/+1 until end of turn.
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(1, 1));
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}
private HaazdaOfficer(final HaazdaOfficer card) {
super(card);
}
@Override
public HaazdaOfficer copy() {
return new HaazdaOfficer(this);
}
}

View file

@ -113,6 +113,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
cards.add(new SetCardInfo("Guardian Project", 130, Rarity.RARE, mage.cards.g.GuardianProject.class));
cards.add(new SetCardInfo("Gutterbones", 76, Rarity.RARE, mage.cards.g.Gutterbones.class));
cards.add(new SetCardInfo("Gyre Engineer", 180, Rarity.UNCOMMON, mage.cards.g.GyreEngineer.class));
cards.add(new SetCardInfo("Haazda Officer", 10, Rarity.COMMON, mage.cards.h.HaazdaOfficer.class));
cards.add(new SetCardInfo("Hackrobat", 181, Rarity.UNCOMMON, mage.cards.h.Hackrobat.class));
cards.add(new SetCardInfo("Hallowed Fountain", 251, Rarity.RARE, mage.cards.h.HallowedFountain.class));
cards.add(new SetCardInfo("Hero of Precinct One", 11, Rarity.RARE, mage.cards.h.HeroOfPrecinctOne.class));

View file

@ -1,8 +1,6 @@
package mage.abilities.effects.common.continuous;
import java.util.Locale;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.dynamicvalue.DynamicValue;
@ -17,8 +15,10 @@ import mage.game.permanent.Permanent;
import mage.target.Target;
import mage.util.CardUtil;
import java.util.Locale;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class BoostTargetEffect extends ContinuousEffectImpl {
@ -27,6 +27,10 @@ public class BoostTargetEffect extends ContinuousEffectImpl {
private DynamicValue toughness;
private boolean lockedIn;
public BoostTargetEffect(int power, int toughness) {
this(power, toughness, Duration.EndOfTurn);
}
public BoostTargetEffect(int power, int toughness, Duration duration) {
this(new StaticValue(power), new StaticValue(toughness), duration, false);
}
@ -39,8 +43,8 @@ public class BoostTargetEffect extends ContinuousEffectImpl {
* @param power
* @param toughness
* @param duration
* @param lockedIn if true, power and toughness will be calculated only
* once, when the ability resolves
* @param lockedIn if true, power and toughness will be calculated only
* once, when the ability resolves
*/
public BoostTargetEffect(DynamicValue power, DynamicValue toughness, Duration duration, boolean lockedIn) {
super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, isCanKill(toughness) ? Outcome.UnboostCreature : Outcome.BoostCreature);