diff --git a/Mage.Sets/src/mage/cards/h/HotshotMechanic.java b/Mage.Sets/src/mage/cards/h/HotshotMechanic.java new file mode 100644 index 0000000000..fed15e6b99 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HotshotMechanic.java @@ -0,0 +1,37 @@ +package mage.cards.h; + +import mage.MageInt; +import mage.abilities.common.CrewIncreasedPowerAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HotshotMechanic extends CardImpl { + + public HotshotMechanic(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.FOX); + this.subtype.add(SubType.PILOT); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Hotshot Mechanic crews Vehicles as though its power were 2 greater. + this.addAbility(new CrewIncreasedPowerAbility()); + } + + private HotshotMechanic(final HotshotMechanic card) { + super(card); + } + + @Override + public HotshotMechanic copy() { + return new HotshotMechanic(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index 4e6f3fe486..f97e178188 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -61,6 +61,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Hand of Enlightenment", 11, Rarity.COMMON, mage.cards.h.HandOfEnlightenment.class)); cards.add(new SetCardInfo("Hidetsugu, Devouring Chaos", 99, Rarity.RARE, mage.cards.h.HidetsuguDevouringChaos.class)); cards.add(new SetCardInfo("High-Speed Hoverbike", 247, Rarity.UNCOMMON, mage.cards.h.HighSpeedHoverbike.class)); + cards.add(new SetCardInfo("Hotshot Mechanic", 16, Rarity.UNCOMMON, mage.cards.h.HotshotMechanic.class)); cards.add(new SetCardInfo("Imperial Moth", 4, Rarity.COMMON, mage.cards.i.ImperialMoth.class)); cards.add(new SetCardInfo("Imperial Subduer", 19, Rarity.COMMON, mage.cards.i.ImperialSubduer.class)); cards.add(new SetCardInfo("Inkrise Infiltrator", 100, Rarity.COMMON, mage.cards.i.InkriseInfiltrator.class)); diff --git a/Mage/src/main/java/mage/abilities/common/CrewIncreasedPowerAbility.java b/Mage/src/main/java/mage/abilities/common/CrewIncreasedPowerAbility.java new file mode 100644 index 0000000000..29411d66f7 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/common/CrewIncreasedPowerAbility.java @@ -0,0 +1,28 @@ +package mage.abilities.common; + +import mage.abilities.StaticAbility; +import mage.abilities.effects.common.InfoEffect; +import mage.constants.Zone; + +/** + * @author TheElk801 + */ +public class CrewIncreasedPowerAbility extends StaticAbility { + + public CrewIncreasedPowerAbility() { + this("{this}"); + } + + public CrewIncreasedPowerAbility(String selfName) { + super(Zone.BATTLEFIELD, new InfoEffect(selfName + " crews Vehicles as though its power were 2 greater.")); + } + + private CrewIncreasedPowerAbility(final CrewIncreasedPowerAbility ability) { + super(ability); + } + + @Override + public CrewIncreasedPowerAbility copy() { + return new CrewIncreasedPowerAbility(this); + } +} diff --git a/Mage/src/main/java/mage/abilities/keyword/CrewAbility.java b/Mage/src/main/java/mage/abilities/keyword/CrewAbility.java index 5f0ba42fdd..652d177fdf 100644 --- a/Mage/src/main/java/mage/abilities/keyword/CrewAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/CrewAbility.java @@ -1,7 +1,7 @@ package mage.abilities.keyword; -import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.common.CrewIncreasedPowerAbility; import mage.abilities.common.CrewWithToughnessAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.Cost; @@ -140,14 +140,12 @@ class CrewCost extends CostImpl { } private int getCrewPower(Permanent permanent, Game game) { - MageInt crewPowerSource = null; - if (permanent.hasAbility(CrewWithToughnessAbility.getInstance(), game)) { - crewPowerSource = permanent.getToughness(); + return permanent.getToughness().getValue(); + } else if (permanent.getAbilities(game).containsClass(CrewIncreasedPowerAbility.class)) { + return permanent.getPower().getValue() + 2; } else { - crewPowerSource = permanent.getPower(); + return permanent.getPower().getValue(); } - - return crewPowerSource.getValue(); } }