@Override public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) { mageObject.removePTCDA(); mageObject.getPower().modifyBaseValue(7); mageObject.getToughness().modifyBaseValue(7); return true; }
public ManaPoolItem(ConditionalMana conditionalMana, MageObject sourceObject, UUID originalId) { this.conditionalMana = conditionalMana; this.sourceObject = sourceObject; this.originalId = originalId; this.conditionalMana.setManaProducerId(sourceObject.getId()); this.conditionalMana.setManaProducerOriginalId(originalId); this.flag = conditionalMana.getFlag(); this.duration = Duration.EndOfStep; }
public BasicManaEffect(ConditionalMana conditionalMana) { super(); this.manaTemplate = conditionalMana; staticText = "add " + manaTemplate.toString() + " " + conditionalMana.getDescription(); }
@Override public boolean apply(MageObject input, Game game) { return input.getPower().getValue() != input.getToughness().getValue(); }
@Override protected int getInputValue(MageObject input) { return input.getToughness().getValue(); }
@Override public String toString() { if (!compareColor.isMulticolored()) { return compareColor.getDescription() + " is the most common color among all permanents or is tied for most common"; } else { return "it shares a color with the most common color among all permanents or a color tied for most common"; } } }
@Override public boolean apply(MageObject input, Game game) { return 1 == input.getColor(game).getColorCount(); }
@Override public boolean apply(MageObject input, Game game) { return input.getColor(game).isColorless(); }
@Override public UUID getSourceId() { if (sourceObject != null) { return sourceObject.getId(); } return null; }
@Override public String toString() { return "Color(" + color.toString() + ')'; } }
public PreventDamageByColorEffect(ObjectColor color, int amount) { super(Duration.WhileOnBattlefield, amount, false, false); this.color = color; this.staticText = "If a " + color.getDescription() + " source would deal damage to you, prevent " + amount + " of that damage"; }
public CorruptedGrafstoneManaEffect() { super(); computedMana = new Mana(); this.staticText = "Choose a color of a card in your graveyard. Add one mana of that color"; }
@Override public Mana produceMana(boolean netMana, Game game, Ability source) { if (netMana) { return null; } return mana.copy(); } }
/** * Sets the total Generic mana. Can not be negative. Negative values will be * logged and set to 0. * * @param generic total Generic mana. */ public void setGeneric(int generic) { this.generic = notNegative(generic, "Generic"); }
@Override protected int getInputValue(MageObject input) { return input.getPower().getValue() + input.getToughness().getValue(); }
@Override public boolean apply(MageObject input, Game game) { return input.getToughness().getValue() > input.getPower().getValue(); }