mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Cleaned up MinscBooTimelessHeroes slightly
This commit is contained in:
parent
9ebf16ca26
commit
d061526924
1 changed files with 29 additions and 13 deletions
|
@ -43,8 +43,8 @@ public final class MinscBooTimelessHeroes extends CardImpl {
|
|||
static {
|
||||
filter.add(Predicates.or(
|
||||
new AbilityPredicate(TrampleAbility.class),
|
||||
new AbilityPredicate(HasteAbility.class)
|
||||
));
|
||||
new AbilityPredicate(HasteAbility.class))
|
||||
);
|
||||
}
|
||||
|
||||
public MinscBooTimelessHeroes(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -54,22 +54,28 @@ public final class MinscBooTimelessHeroes extends CardImpl {
|
|||
this.subtype.add(SubType.MINSC);
|
||||
this.setStartingLoyalty(3);
|
||||
|
||||
// When Minsc & Boo, Timeless Heroes enters the battlefield and at the beginning of your upkeep, you may create Boo, a legendary 1/1 red Hamster creature token with trample and haste.
|
||||
// When Minsc & Boo, Timeless Heroes enters the battlefield and at the beginning of your upkeep,
|
||||
// you may create Boo, a legendary 1/1 red Hamster creature token with trample and haste.
|
||||
this.addAbility(new OrTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new CreateTokenEffect(new BooToken()), true,
|
||||
Zone.BATTLEFIELD,
|
||||
new CreateTokenEffect(new BooToken()),
|
||||
true,
|
||||
"When {this} enters the battlefield and at the beginning of your upkeep, ",
|
||||
new EntersBattlefieldTriggeredAbility(null, false),
|
||||
new BeginningOfUpkeepTriggeredAbility(null, TargetController.YOU, false)
|
||||
));
|
||||
new BeginningOfUpkeepTriggeredAbility(null, TargetController.YOU, false))
|
||||
);
|
||||
|
||||
// +1: Put three +1/+1 counters on up to one target creature with trample or haste.
|
||||
Ability ability = new LoyaltyAbility(
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance(3)), 1
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance(3)),
|
||||
1
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(0, 1, filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// −2: Sacrifice a creature. When you do, Minsc & Boo, Timeless Heroes deals X damage to any target, where X is that creature's power. If the sacrificed creature was a Hamster, draw X cards.
|
||||
// −2: Sacrifice a creature.
|
||||
// When you do, Minsc & Boo, Timeless Heroes deals X damage to any target, where X is that creature's power.
|
||||
// If the sacrificed creature was a Hamster, draw X cards.
|
||||
this.addAbility(new LoyaltyAbility(new MinscBooTimelessHeroesEffect(), -2));
|
||||
|
||||
// Minsc & Boo, Timeless Heroes can be your commander.
|
||||
|
@ -106,27 +112,37 @@ class MinscBooTimelessHeroesEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null || !game.getBattlefield().contains(
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE, source, game, 1
|
||||
)) {
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!game.getBattlefield().contains(StaticFilters.FILTER_CONTROLLED_CREATURE, source, game, 1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TargetPermanent target = new TargetControlledCreaturePermanent();
|
||||
target.setNotTarget(true);
|
||||
player.choose(outcome, target, source, game);
|
||||
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent == null || !permanent.sacrifice(source, game)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int power = permanent.getPower().getValue();
|
||||
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(
|
||||
new DamageTargetEffect(power), false, "deals X damage to any target, " +
|
||||
"where X is that creature's power. If the sacrificed creature was a Hamster, draw X cards"
|
||||
new DamageTargetEffect(power),
|
||||
false,
|
||||
"deals X damage to any target, where X is that creature's power. " +
|
||||
"If the sacrificed creature was a Hamster, draw X cards"
|
||||
);
|
||||
|
||||
if (permanent.hasSubtype(SubType.HAMSTER, game)) {
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(power));
|
||||
}
|
||||
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
|
||||
game.fireReflexiveTriggeredAbility(ability, source);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue