* Some minor changes.

This commit is contained in:
LevelX2 2018-05-31 14:16:07 +02:00
parent 002556e1e5
commit a46b6eadd5
4 changed files with 13 additions and 11 deletions

View file

@ -42,9 +42,9 @@ import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
@ -147,12 +147,14 @@ class DauntlessBodyguardGainAbilityEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
MageObjectReference mor;
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (sourcePermanent == null) {
return false;
}
mor = (MageObjectReference) game.getState().getValue(sourcePermanent.getId() + "_chosenCreature");
MageObjectReference mor = (MageObjectReference) game.getState().getValue(sourcePermanent.getId() + "_chosenCreature");
if (mor == null) {
return false;
}
Permanent chosenPermanent = mor.getPermanent(game);
if (chosenPermanent != null) {
ContinuousEffect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn);

View file

@ -44,7 +44,7 @@ import mage.choices.ChoiceColor;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
@ -59,7 +59,8 @@ public final class FoodChain extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
// Exile a creature you control: Add X mana of any one color, where X is the exiled creature's converted mana cost plus one. Spend this mana only to cast creature spells.
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new FoodChainManaEffect(), new ExileTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature you control"), true)));
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new FoodChainManaEffect(),
new ExileTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_A_CREATURE, true)));
this.addAbility(ability);
}

View file

@ -40,13 +40,13 @@ import mage.abilities.effects.common.continuous.LoseAllAbilitiesTargetEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
import mage.abilities.effects.common.cost.SpellsCostReductionAllEffect;
import mage.abilities.keyword.PartnerWithAbility;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
@ -71,9 +71,7 @@ public final class WillKenrith extends CardImpl {
// +2: Until your next turn, up to two target creatures each have base power and toughness 0/3 and lose all abilities.
Ability ability = new LoyaltyAbility(
new SetPowerToughnessTargetEffect(0, 3, Duration.UntilYourNextTurn)
.setText("until your next turn, up to two target creatures each have base power and toughness 0/3"),
2
);
.setText("until your next turn, up to two target creatures each have base power and toughness 0/3"), 2);
ability.addEffect(new LoseAllAbilitiesTargetEffect(Duration.UntilYourNextTurn)
.setText("and lose all abilities")
);

View file

@ -795,6 +795,7 @@ public interface Player extends MageItem, Copyable<Player> {
* @param withName
* @return
*/
@Deprecated
boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId, Game game, Zone fromZone, boolean withName);
/**