mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Some changes to game log messages.
This commit is contained in:
parent
acd960343b
commit
e496f0b77b
3 changed files with 21 additions and 11 deletions
|
@ -99,16 +99,17 @@ class ReshapeSearchEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
FilterCard filter = new FilterCard("artifact card with converted mana cost X or less");
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
//Set the mana cost one higher to 'emulate' a less than or equal to comparison.
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1));
|
||||
int xValue = source.getManaCostsToPay().getX() + 1;
|
||||
FilterCard filter = new FilterCard("artifact card with converted mana cost " + xValue + " or less");
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, xValue));
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||
if (player.searchLibrary(target, game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
card.putOntoBattlefield(game, Zone.LIBRARY, source.getId(), source.getControllerId());
|
||||
player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
|
||||
}
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
|
|
|
@ -58,6 +58,9 @@ public class GreenSunsZenith extends CardImpl {
|
|||
super(ownerId, 81, "Green Sun's Zenith", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{G}");
|
||||
this.expansionSetCode = "MBS";
|
||||
this.color.setGreen(true);
|
||||
// Search your library for a green creature card with converted mana cost X or less,
|
||||
// put it onto the battlefield, then shuffle your library.
|
||||
// Shuffle Green Sun's Zenith into its owner's library.
|
||||
this.getSpellAbility().addEffect(new GreenSunsZenithSearchEffect());
|
||||
this.getSpellAbility().addEffect(ShuffleSpellEffect.getInstance());
|
||||
}
|
||||
|
@ -86,19 +89,23 @@ class GreenSunsZenithSearchEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null)
|
||||
if (player == null) {
|
||||
return false;
|
||||
FilterCard filter = new FilterCard("green creature card with converted mana cost X or less");
|
||||
}
|
||||
//Set the mana cost one higher to 'emulate' a less than or equal to comparison.
|
||||
int xValue = source.getManaCostsToPay().getX() + 1;
|
||||
FilterCard filter = new FilterCard("green creature card with converted mana cost " + xValue + " or less");
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
//Set the mana cost one higher to 'emulate' a less than or equal to comparison.
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1));
|
||||
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, xValue));
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||
if (player.searchLibrary(target, game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
|
||||
if (card != null)
|
||||
card.putOntoBattlefield(game, Zone.LIBRARY, source.getId(), source.getControllerId());
|
||||
if (card != null) {
|
||||
player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId());
|
||||
}
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
|
@ -112,4 +119,4 @@ class GreenSunsZenithSearchEffect extends OneShotEffect {
|
|||
return new GreenSunsZenithSearchEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,8 +49,10 @@ public class OvergrownTomb extends CardImpl {
|
|||
this.expansionSetCode = "RAV";
|
||||
this.subtype.add("Swamp");
|
||||
this.subtype.add("Forest");
|
||||
|
||||
this.addAbility(new BlackManaAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue