diff --git a/Mage.Sets/src/mage/cards/m/MrOrfeoTheBoulder.java b/Mage.Sets/src/mage/cards/m/MrOrfeoTheBoulder.java new file mode 100644 index 0000000000..59975e93fb --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MrOrfeoTheBoulder.java @@ -0,0 +1,78 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksWithCreaturesTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MrOrfeoTheBoulder extends CardImpl { + + public MrOrfeoTheBoulder(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.RHINO); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Whenever you attack, double target creature's power until end of turn. + Ability ability = new AttacksWithCreaturesTriggeredAbility(new MrOrfeoTheBoulderEffect(), 1); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + private MrOrfeoTheBoulder(final MrOrfeoTheBoulder card) { + super(card); + } + + @Override + public MrOrfeoTheBoulder copy() { + return new MrOrfeoTheBoulder(this); + } +} + +class MrOrfeoTheBoulderEffect extends OneShotEffect { + + MrOrfeoTheBoulderEffect() { + super(Outcome.Benefit); + staticText = "double target creature's power until end of turn"; + } + + private MrOrfeoTheBoulderEffect(final MrOrfeoTheBoulderEffect effect) { + super(effect); + } + + @Override + public MrOrfeoTheBoulderEffect copy() { + return new MrOrfeoTheBoulderEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent == null) { + return false; + } + game.addEffect(new BoostTargetEffect( + permanent.getPower().getValue(), 0 + ).setTargetPointer(new FixedTarget(permanent, game)), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java index 8f019c00d9..3edfd94c04 100644 --- a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java +++ b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java @@ -104,6 +104,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet { cards.add(new SetCardInfo("Make Disappear", 49, Rarity.COMMON, mage.cards.m.MakeDisappear.class)); cards.add(new SetCardInfo("Mayhem Patrol", 114, Rarity.COMMON, mage.cards.m.MayhemPatrol.class)); cards.add(new SetCardInfo("Mountain", 268, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mr. Orfeo, the Boulder", 204, Rarity.UNCOMMON, mage.cards.m.MrOrfeoTheBoulder.class)); cards.add(new SetCardInfo("Murder", 88, Rarity.COMMON, mage.cards.m.Murder.class)); cards.add(new SetCardInfo("Night Clubber", 89, Rarity.UNCOMMON, mage.cards.n.NightClubber.class)); cards.add(new SetCardInfo("Nimble Larcenist", 205, Rarity.UNCOMMON, mage.cards.n.NimbleLarcenist.class)); diff --git a/Utils/gen-card.pl b/Utils/gen-card.pl index 582ce38203..3aca628e2b 100755 --- a/Utils/gen-card.pl +++ b/Utils/gen-card.pl @@ -20,7 +20,7 @@ my %keywords; sub toCamelCase { my $string = $_[0]; $string =~ s/\b([\w']+)\b/ucfirst($1)/ge; - $string =~ s/[-,\s\':]//g; + $string =~ s/[-,\s\':.]//g; $string; }