- little AI fix Quarry Colossus

This commit is contained in:
jeffwadsworth 2020-07-14 14:11:43 -05:00
parent 2e0be17494
commit 9f92377eef

View file

@ -1,4 +1,3 @@
package mage.cards.q; package mage.cards.q;
import java.util.UUID; import java.util.UUID;
@ -30,7 +29,8 @@ public final class QuarryColossus extends CardImpl {
this.power = new MageInt(5); this.power = new MageInt(5);
this.toughness = new MageInt(6); this.toughness = new MageInt(6);
// When Quarry Colossus enters the battlefield, put target creature into its owner's library just beneath the top X cards of that library, where X is the number of Plains you control. // When Quarry Colossus enters the battlefield, put target creature into its owner's
// library just beneath the top X cards of that library, where X is the number of Plains you control.
Ability ability = new EntersBattlefieldTriggeredAbility(new QuarryColossusReturnLibraryEffect(), false); Ability ability = new EntersBattlefieldTriggeredAbility(new QuarryColossusReturnLibraryEffect(), false);
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);
@ -49,8 +49,9 @@ public final class QuarryColossus extends CardImpl {
class QuarryColossusReturnLibraryEffect extends OneShotEffect { class QuarryColossusReturnLibraryEffect extends OneShotEffect {
public QuarryColossusReturnLibraryEffect() { public QuarryColossusReturnLibraryEffect() {
super(Outcome.Benefit); super(Outcome.Detriment);
this.staticText = "put target creature into its owner's library just beneath the top X cards of that library, where X is the number of Plains you control"; this.staticText = "put target creature into its owner's library just beneath the "
+ "top X cards of that library, where X is the number of Plains you control";
} }
public QuarryColossusReturnLibraryEffect(final QuarryColossusReturnLibraryEffect effect) { public QuarryColossusReturnLibraryEffect(final QuarryColossusReturnLibraryEffect effect) {
@ -69,7 +70,8 @@ class QuarryColossusReturnLibraryEffect extends OneShotEffect {
if (permanent != null && controller != null) { if (permanent != null && controller != null) {
Player owner = game.getPlayer(permanent.getOwnerId()); Player owner = game.getPlayer(permanent.getOwnerId());
if (owner != null) { if (owner != null) {
int plains = game.getBattlefield().countAll(new FilterPermanent(SubType.PLAINS, "Plains you control"), source.getControllerId(), game); int plains = game.getBattlefield().countAll(new FilterPermanent(
SubType.PLAINS, "Plains you control"), source.getControllerId(), game);
controller.putCardOnTopXOfLibrary(permanent, game, source, plains); controller.putCardOnTopXOfLibrary(permanent, game, source, plains);
return true; return true;
} }