mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Some minor changes.
This commit is contained in:
parent
002556e1e5
commit
a46b6eadd5
4 changed files with 13 additions and 11 deletions
|
@ -42,9 +42,9 @@ import mage.abilities.keyword.IndestructibleAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
|
@ -68,7 +68,7 @@ public final class DauntlessBodyguard extends CardImpl {
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// As Dauntless Bodyguard enters the battlefield, choose another creature you control.
|
// As Dauntless Bodyguard enters the battlefield, choose another creature you control.
|
||||||
this.addAbility(new AsEntersBattlefieldAbility(new DauntlessBodyguardChooseCreatureEffect()));
|
this.addAbility(new AsEntersBattlefieldAbility(new DauntlessBodyguardChooseCreatureEffect()));
|
||||||
|
|
||||||
// Sacrifice Dauntless Bodyguard: The chosen creature gains indestructible until end of turn.
|
// Sacrifice Dauntless Bodyguard: The chosen creature gains indestructible until end of turn.
|
||||||
|
@ -147,12 +147,14 @@ class DauntlessBodyguardGainAbilityEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
MageObjectReference mor;
|
|
||||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
if (sourcePermanent == null) {
|
if (sourcePermanent == null) {
|
||||||
return false;
|
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);
|
Permanent chosenPermanent = mor.getPermanent(game);
|
||||||
if (chosenPermanent != null) {
|
if (chosenPermanent != null) {
|
||||||
ContinuousEffect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn);
|
ContinuousEffect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn);
|
||||||
|
|
|
@ -44,7 +44,7 @@ import mage.choices.ChoiceColor;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
@ -59,7 +59,8 @@ public final class FoodChain extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
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.
|
// 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);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,13 +40,13 @@ import mage.abilities.effects.common.continuous.LoseAllAbilitiesTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
|
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
|
||||||
import mage.abilities.effects.common.cost.SpellsCostReductionAllEffect;
|
import mage.abilities.effects.common.cost.SpellsCostReductionAllEffect;
|
||||||
import mage.abilities.keyword.PartnerWithAbility;
|
import mage.abilities.keyword.PartnerWithAbility;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
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.
|
// +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(
|
Ability ability = new LoyaltyAbility(
|
||||||
new SetPowerToughnessTargetEffect(0, 3, Duration.UntilYourNextTurn)
|
new SetPowerToughnessTargetEffect(0, 3, Duration.UntilYourNextTurn)
|
||||||
.setText("until your next turn, up to two target creatures each have base power and toughness 0/3"),
|
.setText("until your next turn, up to two target creatures each have base power and toughness 0/3"), 2);
|
||||||
2
|
|
||||||
);
|
|
||||||
ability.addEffect(new LoseAllAbilitiesTargetEffect(Duration.UntilYourNextTurn)
|
ability.addEffect(new LoseAllAbilitiesTargetEffect(Duration.UntilYourNextTurn)
|
||||||
.setText("and lose all abilities")
|
.setText("and lose all abilities")
|
||||||
);
|
);
|
||||||
|
|
|
@ -795,6 +795,7 @@ public interface Player extends MageItem, Copyable<Player> {
|
||||||
* @param withName
|
* @param withName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId, Game game, Zone fromZone, boolean withName);
|
boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId, Game game, Zone fromZone, boolean withName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue