* Skyshrout War Beast - Fixed wrong P/T calculation because of wrong land filter.

This commit is contained in:
LevelX2 2018-03-16 20:11:10 +01:00
parent 5925bdf259
commit 62db7ae72f
2 changed files with 9 additions and 8 deletions

View file

@ -36,7 +36,6 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.ChooseOpponentEffect; import mage.abilities.effects.common.ChooseOpponentEffect;
import mage.constants.SubType;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -45,9 +44,9 @@ import mage.constants.Duration;
import mage.constants.Layer; import mage.constants.Layer;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubLayer; import mage.constants.SubLayer;
import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent; import mage.filter.StaticFilters;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
@ -107,9 +106,7 @@ class SkyshroudWarBeastEffect extends ContinuousEffectImpl {
MageObject target = game.getObject(source.getSourceId()); MageObject target = game.getObject(source.getSourceId());
if (target != null) { if (target != null) {
UUID playerId = (UUID) game.getState().getValue(source.getSourceId().toString() + ChooseOpponentEffect.VALUE_KEY); UUID playerId = (UUID) game.getState().getValue(source.getSourceId().toString() + ChooseOpponentEffect.VALUE_KEY);
FilterLandPermanent filter = new FilterLandPermanent(); int number = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_LANDS_NONBASIC).calculate(game, source, this);
filter.add(new ControllerIdPredicate(playerId));
int number = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this);
target.getPower().setValue(number); target.getPower().setValue(number);
target.getToughness().setValue(number); target.getToughness().setValue(number);
return true; return true;

View file

@ -179,13 +179,13 @@ public final class StaticFilters {
static { static {
FILTER_CONTROLLED_CREATURE.setLockedFilter(true); FILTER_CONTROLLED_CREATURE.setLockedFilter(true);
} }
public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_CREATURES = new FilterControlledCreaturePermanent("creatures you control"); public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_CREATURES = new FilterControlledCreaturePermanent("creatures you control");
static { static {
FILTER_CONTROLLED_CREATURES.setLockedFilter(true); FILTER_CONTROLLED_CREATURES.setLockedFilter(true);
} }
public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_A_CREATURE = new FilterControlledCreaturePermanent("a creature you control"); public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_A_CREATURE = new FilterControlledCreaturePermanent("a creature you control");
static { static {
@ -210,11 +210,15 @@ public final class StaticFilters {
static { static {
FILTER_LAND.setLockedFilter(true); FILTER_LAND.setLockedFilter(true);
} }
public static final FilterLandPermanent FILTER_LANDS = new FilterLandPermanent("lands"); public static final FilterLandPermanent FILTER_LANDS = new FilterLandPermanent("lands");
static { static {
FILTER_LANDS.setLockedFilter(true); FILTER_LANDS.setLockedFilter(true);
} }
public static final FilterLandPermanent FILTER_LANDS_NONBASIC = FilterLandPermanent.nonbasicLands();
public static final FilterBasicLandCard FILTER_BASIC_LAND_CARD = new FilterBasicLandCard(); public static final FilterBasicLandCard FILTER_BASIC_LAND_CARD = new FilterBasicLandCard();
static { static {