Implemented Gravebreaker Lamia.

This commit is contained in:
LevelX2 2020-01-12 11:29:43 +01:00
parent fe0717cbc7
commit 7d3f17d578
5 changed files with 133 additions and 4 deletions

View file

@ -55,7 +55,8 @@ public class SpellsCostReductionControllerEffect extends CostModificationEffectI
this.filter = filter;
this.amount = amount;
this.upTo = upTo;
this.staticText = filter.getMessage() + " you cast cost " + (upTo ? "up to " : "") + '{' + amount + "} less to cast";
this.staticText = (filter.getMessage().contains("you cast") ? filter.getMessage() : filter.getMessage() + " you cast")
+ " cost " + (upTo ? "up to " : "") + '{' + amount + "} less to cast";
}
protected SpellsCostReductionControllerEffect(final SpellsCostReductionControllerEffect effect) {

View file

@ -0,0 +1,39 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mage.filter.predicate.other;
import mage.cards.Card;
import mage.constants.Zone;
import mage.filter.predicate.Predicate;
import mage.game.Game;
import mage.game.stack.Spell;
/**
*
* @author LevelX2
*/
public class CastFromZonePredicate implements Predicate<Card> {
private final Zone zone;
public CastFromZonePredicate(Zone zone) {
this.zone = zone;
}
@Override
public boolean apply(Card input, Game game) {
if (input instanceof Spell) {
return zone.match(((Spell) input).getFromZone());
} else {
return zone.match(game.getState().getZone(input.getId()));
}
}
@Override
public String toString() {
return "Spells you cast from your " + zone.toString();
}
}