public AddManaToManaPoolSourceControllerEffect(Mana mana) { super(Outcome.PutManaInPool); this.mana = mana; this.staticText = "Add " + mana.toString() + ""; }
public BasicManaEffect(Mana mana) { super(); this.manaTemplate = mana; staticText = "add " + mana.toString(); }
public SavageVentmawManaEffect(Mana mana, String textManaPoolOwner, boolean emptyOnTurnsEnd) { super(); this.mana = mana; this.emptyOnlyOnTurnsEnd = emptyOnTurnsEnd; this.staticText = (textManaPoolOwner.equals("their") ? "that player adds " : "add ") + mana.toString(); }
/** * Adds mana to the mana pool of target pointer player * * @param mana mana that will be added to the pool * @param textManaPoolOwner text that references to the mana pool owner * (e.g. "damaged player's") * @param emptyOnTurnsEnd if set, the mana will empty only on end of * turnstep * */ public AddManaToManaPoolTargetControllerEffect(Mana mana, String textManaPoolOwner, boolean emptyOnTurnsEnd) { super(); this.mana = mana; this.emptyOnlyOnTurnsEnd = emptyOnTurnsEnd; this.staticText = (textManaPoolOwner.equals("their") ? "that player adds " : "add ") + mana.toString(); }
public AddConditionalManaEffect(Mana mana, ConditionalManaBuilder manaBuilder) { super(); this.mana = mana; this.manaBuilder = manaBuilder; staticText = "Add " + this.mana.toString() + ". " + manaBuilder.getRule(); }
public BasicManaEffect(ConditionalMana conditionalMana) { super(); this.manaTemplate = conditionalMana; staticText = "add " + manaTemplate.toString() + " " + conditionalMana.getDescription(); }
private void addManaCombination(Mana mana, Mana existingMana, List<Mana> payCombinations, List<String> payCombinationsStrings) { Mana newMana = existingMana.copy(); newMana.add(mana); payCombinations.add(newMana); payCombinationsStrings.add(newMana.toString()); }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { SpellAbility spellAbility = (SpellAbility) abilityToModify; Mana mana = spellAbility.getManaCostsToPay().getMana(); if (mana.getGeneric() > 0) { int count = game.getOpponents(source.getControllerId()).size(); int newCount = mana.getGeneric() - count; if (newCount < 0) { newCount = 0; } mana.setGeneric(newCount); spellAbility.getManaCostsToPay().load(mana.toString()); return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { SpellAbility spellAbility = (SpellAbility) abilityToModify; Mana mana = spellAbility.getManaCostsToPay().getMana(); if (mana.getGeneric() > 0) { int newCount = mana.getGeneric() - 6; if (newCount < 0) { newCount = 0; } mana.setGeneric(newCount); spellAbility.getManaCostsToPay().load(mana.toString()); return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { SpellAbility spellAbility = (SpellAbility) abilityToModify; Mana mana = spellAbility.getManaCostsToPay().getMana(); if (mana.getGeneric() > 0) { int newCount = mana.getGeneric() - 6; if (newCount < 0) { newCount = 0; } mana.setGeneric(newCount); spellAbility.getManaCostsToPay().load(mana.toString()); return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { SpellAbility spellAbility = (SpellAbility) abilityToModify; Mana mana = spellAbility.getManaCostsToPay().getMana(); if (mana.getGeneric() > 0) { int newCount = mana.getGeneric() - 6; if (newCount < 0) { newCount = 0; } mana.setGeneric(newCount); spellAbility.getManaCostsToPay().load(mana.toString()); return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { SpellAbility spellAbility = (SpellAbility) abilityToModify; Mana mana = spellAbility.getManaCostsToPay().getMana(); if (mana.getGeneric() > 0) { int newCount = mana.getGeneric() - 2; if (newCount < 0) { newCount = 0; } mana.setGeneric(newCount); spellAbility.getManaCostsToPay().load(mana.toString()); return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent iceCauldron = game.getPermanent(source.getSourceId()); if (controller != null && iceCauldron != null) { game.getState().setValue("IceCauldronMana" + source.getSourceId().toString(), source.getManaCostsToPay().getUsedManaToPay()); //store the mana used to pay manaUsedString = source.getManaCostsToPay().getUsedManaToPay().toString(); iceCauldron.addInfo("MANA USED", CardUtil.addToolTipMarkTags("Mana used last: " + manaUsedString), game); return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent jeweledAmulet = game.getPermanent(source.getSourceId()); if (controller != null && jeweledAmulet != null) { game.getState().setValue("JeweledAmulet" + source.getSourceId().toString(), source.getManaCostsToPay().getUsedManaToPay()); //store the mana used to pay manaUsedString = source.getManaCostsToPay().getUsedManaToPay().toString(); jeweledAmulet.addInfo("MANA USED", CardUtil.addToolTipMarkTags("Mana used last: " + manaUsedString), game); return true; } return false; } }
@Override public ConditionalManaBuilder setMana(Mana mana, Ability source, Game game) { creatureType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game); Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (controller != null && sourceObject != null) { game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() + " (can only be spent to cast creatures of type " + creatureType + ")"); } return super.setMana(mana, source, game); }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { SpellAbility spellAbility = (SpellAbility)abilityToModify; Mana mana = spellAbility.getManaCostsToPay().getMana(); if (mana.getGeneric() > 0) { int count = new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this); int newCount = mana.getGeneric() - count; if (newCount < 0) { newCount = 0; } mana.setGeneric(newCount); spellAbility.getManaCostsToPay().load(mana.toString()); return true; } return false; }
@Override public ConditionalManaBuilder setMana(Mana mana, Ability source, Game game) { SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game); if (subType != null) { creatureType = subType; } Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (controller != null && sourceObject != null) { game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() + " (can only be spend to cast for creatures of type " + creatureType + " and that spell can't be countered)"); } return super.setMana(mana, source, game); }
@Override public ConditionalManaBuilder setMana(Mana mana, Ability source, Game game) { SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game); if (subType != null) { creatureType = subType; } Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (controller != null && sourceObject != null) { game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() + " (can only be spent to cast creatures of type " + creatureType + ")"); } return super.setMana(mana, source, game); }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { SpellAbility spellAbility = (SpellAbility) abilityToModify; Mana mana = spellAbility.getManaCostsToPay().getMana(); Player player = game.getPlayer(source.getControllerId()); if (mana.getGeneric() > 0 && player != null && player.getLife() < 4) { int newCount = mana.getGeneric() - 6; if (newCount < 0) { newCount = 0; } mana.setGeneric(newCount); spellAbility.getManaCostsToPay().load(mana.toString()); return true; } return false; }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { SpellAbility spellAbility = (SpellAbility)abilityToModify; Mana mana = spellAbility.getManaCostsToPay().getMana(); if (mana.getGeneric() > 0) { int count = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game); int newCount = mana.getGeneric() - count; if (newCount < 0) { newCount = 0; } mana.setGeneric(newCount); spellAbility.getManaCostsToPay().load(mana.toString()); return true; } return false; }