[SNC] Implemented Mr. Orfeo, the Boulder

This commit is contained in:
Evan Kranzler 2022-04-14 09:12:00 -04:00
parent 3d40bfd7e3
commit ed965e4b10
3 changed files with 80 additions and 1 deletions

View file

@ -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;
}
}

View file

@ -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));

View file

@ -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;
}