mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Ascend ability - added card hint with permanents count;
This commit is contained in:
parent
fb3762a9dd
commit
06c9d7941c
7 changed files with 81 additions and 9 deletions
|
@ -1,10 +1,10 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.keyword.AscendEffect;
|
||||
import mage.abilities.hint.common.CitysBlessingHint;
|
||||
import mage.abilities.hint.common.PermanentsYouControlHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -16,8 +16,9 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class ExpelFromOrazca extends CardImpl {
|
||||
|
@ -25,8 +26,10 @@ public final class ExpelFromOrazca extends CardImpl {
|
|||
public ExpelFromOrazca(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Ascend
|
||||
// Ascend (If you control ten or more permanents, you get the city’s blessing for the rest of the game.)
|
||||
this.getSpellAbility().addEffect(new AscendEffect());
|
||||
this.getSpellAbility().addHint(CitysBlessingHint.instance);
|
||||
this.getSpellAbility().addHint(PermanentsYouControlHint.instance);
|
||||
|
||||
// Return target nonland permanent to its owner's hand. If you have the city's blessing, you may put that permanent on top of its owner's library instead.
|
||||
this.getSpellAbility().addEffect(new ExpelFromOrazcaEffect());
|
||||
|
|
|
@ -5,6 +5,7 @@ import mage.abilities.decorator.ConditionalContinuousEffect;
|
|||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.effects.keyword.AscendEffect;
|
||||
import mage.abilities.hint.common.CitysBlessingHint;
|
||||
import mage.abilities.hint.common.PermanentsYouControlHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -23,8 +24,10 @@ public final class GoldenDemise extends CardImpl {
|
|||
public GoldenDemise(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
|
||||
|
||||
// Ascend
|
||||
// Ascend (If you control ten or more permanents, you get the city’s blessing for the rest of the game.)
|
||||
this.getSpellAbility().addEffect(new AscendEffect());
|
||||
this.getSpellAbility().addHint(CitysBlessingHint.instance);
|
||||
this.getSpellAbility().addHint(PermanentsYouControlHint.instance);
|
||||
|
||||
// All creatures get -2/-2 until end of turn. If you have the city's blessing, instead only creatures your opponents control get -2/-2 until end of turn.
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures your opponents control");
|
||||
|
@ -35,7 +38,6 @@ public final class GoldenDemise extends CardImpl {
|
|||
CitysBlessingCondition.instance,
|
||||
"All creatures get -2/-2 until end of turn. If you have the city's blessing, instead only creatures your opponents control get -2/-2 until end of turn"
|
||||
));
|
||||
this.getSpellAbility().addHint(CitysBlessingHint.instance);
|
||||
}
|
||||
|
||||
public GoldenDemise(final GoldenDemise card) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import mage.abilities.decorator.ConditionalContinuousEffect;
|
|||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.keyword.AscendEffect;
|
||||
import mage.abilities.hint.common.CitysBlessingHint;
|
||||
import mage.abilities.hint.common.PermanentsYouControlHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -22,12 +23,13 @@ public final class PrideOfConquerors extends CardImpl {
|
|||
|
||||
// Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)
|
||||
this.getSpellAbility().addEffect(new AscendEffect());
|
||||
this.getSpellAbility().addHint(CitysBlessingHint.instance);
|
||||
this.getSpellAbility().addHint(PermanentsYouControlHint.instance);
|
||||
|
||||
// Creatures you control get +1/+1 until end of turn. If you have the city's blessing, those creatures get +2/+2 until end of turn instead.
|
||||
this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn),
|
||||
new BoostControlledEffect(1, 1, Duration.EndOfTurn), CitysBlessingCondition.instance,
|
||||
"Creatures you control get +1/+1 until end of turn. If you have the city's blessing, those creatures get +2/+2 until end of turn instead"));
|
||||
this.getSpellAbility().addHint(CitysBlessingHint.instance);
|
||||
}
|
||||
|
||||
public PrideOfConquerors(final PrideOfConquerors card) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
|
|||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.keyword.AscendEffect;
|
||||
import mage.abilities.hint.common.CitysBlessingHint;
|
||||
import mage.abilities.hint.common.PermanentsYouControlHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -21,6 +22,8 @@ public final class SecretsOfTheGoldenCity extends CardImpl {
|
|||
|
||||
// Ascend
|
||||
this.getSpellAbility().addEffect(new AscendEffect());
|
||||
this.getSpellAbility().addHint(CitysBlessingHint.instance);
|
||||
this.getSpellAbility().addHint(PermanentsYouControlHint.instance);
|
||||
|
||||
// Draw two cards. If you have the city's blessing, draw three cards instead.
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
|
@ -28,7 +31,6 @@ public final class SecretsOfTheGoldenCity extends CardImpl {
|
|||
new DrawCardSourceControllerEffect(2),
|
||||
CitysBlessingCondition.instance,
|
||||
"Draw two cards. If you have the city's blessing, draw three cards instead"));
|
||||
this.getSpellAbility().addHint(CitysBlessingHint.instance);
|
||||
}
|
||||
|
||||
public SecretsOfTheGoldenCity(final SecretsOfTheGoldenCity card) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.SacrificeOpponentsEffect;
|
||||
import mage.abilities.effects.keyword.AscendEffect;
|
||||
import mage.abilities.hint.common.CitysBlessingHint;
|
||||
import mage.abilities.hint.common.PermanentsYouControlHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -32,6 +33,8 @@ public final class VonasHunger extends CardImpl {
|
|||
|
||||
// Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)
|
||||
this.getSpellAbility().addEffect(new AscendEffect());
|
||||
this.getSpellAbility().addHint(CitysBlessingHint.instance);
|
||||
this.getSpellAbility().addHint(PermanentsYouControlHint.instance);
|
||||
|
||||
// Each opponent sacrifices a creature.
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
|
@ -43,7 +46,6 @@ public final class VonasHunger extends CardImpl {
|
|||
new VonasHungerEffect(),
|
||||
CitysBlessingCondition.instance,
|
||||
"If you have the city's blessing, instead each opponent sacrifices half the creatures he or she controls rounded up"));
|
||||
this.getSpellAbility().addHint(CitysBlessingHint.instance);
|
||||
}
|
||||
|
||||
public VonasHunger(final VonasHunger card) {
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
public enum PermanentsYouControlCount implements DynamicValue {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_PERMANENT, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PermanentsYouControlCount copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "permanents you control";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package mage.abilities.hint.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsYouControlCount;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
public enum PermanentsYouControlHint implements Hint {
|
||||
|
||||
instance;
|
||||
private static final Hint hint = new ValueHint("Permanents you control", PermanentsYouControlCount.instance);
|
||||
|
||||
@Override
|
||||
public String getText(Game game, Ability ability) {
|
||||
return hint.getText(game, ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Hint copy() {
|
||||
return instance;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue