mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
Implemented Gravebreaker Lamia.
This commit is contained in:
parent
fe0717cbc7
commit
7d3f17d578
5 changed files with 133 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue