mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
commit
51f0e92103
344 changed files with 1505 additions and 1076 deletions
|
|
@ -480,21 +480,21 @@ public class Mana implements Comparable<Mana>, Serializable, Copyable<Mana> {
|
|||
for (int i = 0; i < colorless; i++) {
|
||||
sbMana.append("{C}");
|
||||
}
|
||||
for (int i = 0; i < white; i++) {
|
||||
sbMana.append("{W}");
|
||||
}
|
||||
for (int i = 0; i < blue; i++) {
|
||||
sbMana.append("{U}");
|
||||
}
|
||||
for (int i = 0; i < black; i++) {
|
||||
sbMana.append("{B}");
|
||||
}
|
||||
for (int i = 0; i < red; i++) {
|
||||
sbMana.append("{R}");
|
||||
}
|
||||
for (int i = 0; i < green; i++) {
|
||||
sbMana.append("{G}");
|
||||
}
|
||||
for (int i = 0; i < blue; i++) {
|
||||
sbMana.append("{U}");
|
||||
}
|
||||
for (int i = 0; i < white; i++) {
|
||||
sbMana.append("{W}");
|
||||
}
|
||||
for (int i = 0; i < black; i++) {
|
||||
sbMana.append("{B}");
|
||||
}
|
||||
for (int i = 0; i < any; i++) {
|
||||
sbMana.append("{Any}");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
*/
|
||||
List<String> getRules(String source);
|
||||
|
||||
List<String> getRules(String source, boolean capitalize);
|
||||
|
||||
/**
|
||||
* Retrieves all activated abilities for the given {@link Zone}.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -69,6 +69,11 @@ public class AbilitiesImpl<T extends Ability> extends ArrayList<T> implements Ab
|
|||
|
||||
@Override
|
||||
public List<String> getRules(String source) {
|
||||
return getRules(source, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRules(String source, boolean capitalize) {
|
||||
List<String> rules = new ArrayList<>();
|
||||
|
||||
for (T ability : this) {
|
||||
|
|
@ -78,7 +83,9 @@ public class AbilitiesImpl<T extends Ability> extends ArrayList<T> implements Ab
|
|||
if (!(ability instanceof SpellAbility || ability instanceof PlayLandAbility)) {
|
||||
String rule = ability.getRule();
|
||||
if (rule != null && rule.length() > 3) {
|
||||
rule = Character.toUpperCase(rule.charAt(0)) + rule.substring(1);
|
||||
if (capitalize) {
|
||||
rule = Character.toUpperCase(rule.charAt(0)) + rule.substring(1);
|
||||
}
|
||||
if (ability.getRuleAtTheTop()) {
|
||||
rules.add(0, rule);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -773,7 +773,7 @@ public abstract class AbilityImpl implements Ability {
|
|||
}
|
||||
if (!costs.isEmpty()) {
|
||||
if (sbRule.length() > 0) {
|
||||
sbRule.append(',');
|
||||
sbRule.append(", ");
|
||||
}
|
||||
sbRule.append(costs.getText());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class CompoundAbility extends AbilitiesImpl<Ability> {
|
|||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
List<String> rules = super.getRules(null);
|
||||
List<String> rules = super.getRules(null,false);
|
||||
for (int index = 0; index < rules.size(); index++) {
|
||||
if (index > 0) {
|
||||
if (index < rules.size() - 1) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class CantBlockAbility extends SimpleStaticAbility {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "{this} can't block";
|
||||
return "{this} can't block.";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import mage.game.events.GameEvent;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class EndOfCombatTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public EndOfCombatTriggeredAbility(Effect effect, boolean optional) {
|
||||
|
|
@ -35,7 +34,7 @@ public class EndOfCombatTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.END_COMBAT_STEP_PRE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return true;
|
||||
|
|
@ -43,6 +42,6 @@ public class EndOfCombatTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "At the end of combat, " + super.getRule();
|
||||
return "At end of combat, " + super.getRule();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class PayMoreToCastAsThoughtItHadFlashAbility extends SpellAbility {
|
|||
super(card.getSpellAbility().getManaCosts().copy(), card.getName() + " as though it had flash", Zone.HAND, SpellAbilityType.BASE_ALTERNATE);
|
||||
this.costsToAdd = costsToAdd;
|
||||
this.timing = TimingRule.INSTANT;
|
||||
|
||||
this.ruleAtTheTop = true;
|
||||
CardUtil.increaseCost(this, costsToAdd);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public class CardsInHandCondition implements Condition {
|
||||
|
||||
|
||||
private Condition condition;
|
||||
private ComparisonType type;
|
||||
private int count;
|
||||
|
|
@ -114,7 +113,7 @@ public class CardsInHandCondition implements Condition {
|
|||
@Override
|
||||
public String toString() {
|
||||
int workCount = count;
|
||||
StringBuilder sb = new StringBuilder("if ");
|
||||
StringBuilder sb = new StringBuilder("if");
|
||||
switch (targetController) {
|
||||
case YOU:
|
||||
sb.append(" you have");
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class IsStepCondition implements Condition {
|
|||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("during ");
|
||||
if (onlyDuringYourSteps) {
|
||||
sb.append("your ");
|
||||
sb.append("your ").append(phaseStep.getStepText());
|
||||
} else if (phaseStep == PhaseStep.UPKEEP) {
|
||||
sb.append("any upkeep step");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -45,4 +44,8 @@ public enum RaidCondition implements Condition {
|
|||
PlayerAttackedWatcher watcher = (PlayerAttackedWatcher) game.getState().getWatchers().get(PlayerAttackedWatcher.class.getSimpleName());
|
||||
return watcher != null && watcher.getNumberOfAttackersCurrentTurn(source.getControllerId()) > 0;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "if you attacked with a creature this turn";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import mage.constants.Outcome;
|
||||
|
|
@ -38,6 +37,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -49,7 +49,7 @@ public class UntapTargetCost extends CostImpl {
|
|||
|
||||
public UntapTargetCost(TargetControlledPermanent target) {
|
||||
this.target = target;
|
||||
this.text = "Untap " + target.getMaxNumberOfTargets() + ' ' + target.getTargetName();
|
||||
this.text = "Untap " + CardUtil.numberToText(target.getMaxNumberOfTargets(), "") + ' ' + target.getTargetName();
|
||||
}
|
||||
|
||||
public UntapTargetCost(final UntapTargetCost cost) {
|
||||
|
|
@ -60,10 +60,11 @@ public class UntapTargetCost extends CostImpl {
|
|||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||
if (target.choose(Outcome.Untap, controllerId, sourceId, game)) {
|
||||
for (UUID targetId: (List<UUID>)target.getTargets()) {
|
||||
for (UUID targetId : (List<UUID>) target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent == null)
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
paid |= permanent.untap(game);
|
||||
}
|
||||
}
|
||||
|
|
@ -80,5 +81,4 @@ public class UntapTargetCost extends CostImpl {
|
|||
return new UntapTargetCost(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import mage.abilities.mana.builder.ConditionalManaBuilder;
|
|||
import mage.choices.ChoiceColor;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
|
|
@ -59,8 +60,12 @@ public class AddConditionalManaOfAnyColorEffect extends ManaEffect {
|
|||
this.manaBuilder = manaBuilder;
|
||||
this.oneChoice = oneChoice;
|
||||
//
|
||||
staticText = "Add " + amount + " mana of "
|
||||
+ (oneChoice ? "any one color" : "in any combination of colors")
|
||||
staticText = "Add "
|
||||
+ (amount instanceof StaticValue ? (CardUtil.numberToText(((StaticValue) amount).toString())) : "")
|
||||
+ " mana "
|
||||
+ (oneChoice ? "of any"
|
||||
+ (amount instanceof StaticValue && (((StaticValue) amount).toString()).equals("1") ? "" : " one")
|
||||
+ " color" : "in any combination of colors")
|
||||
+ " to your mana pool. " + manaBuilder.getRule();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,9 +78,8 @@ public class CantBeRegeneratedSourceEffect extends ContinuousRuleModifyingEffect
|
|||
return staticText;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" {this} can't be regenerated");
|
||||
sb.append("{this} can't be regenerated");
|
||||
if (!duration.toString().isEmpty()) {
|
||||
sb.append(' ');
|
||||
if (duration == Duration.EndOfTurn) {
|
||||
sb.append(" this turn");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -46,11 +46,12 @@ public class CastSourceTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public CastSourceTriggeredAbility(Effect effect) {
|
||||
this(effect, false);
|
||||
}
|
||||
|
||||
|
||||
public CastSourceTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.STACK, effect, optional);
|
||||
this.ruleAtTheTop = true;
|
||||
}
|
||||
|
||||
|
||||
public CastSourceTriggeredAbility(final CastSourceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
|
@ -70,7 +71,7 @@ public class CastSourceTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (event.getSourceId().equals(this.getSourceId())) {
|
||||
MageObject spellObject = game.getObject(sourceId);
|
||||
if (spellObject != null && (spellObject instanceof Spell)) {
|
||||
Spell spell = (Spell)spellObject;
|
||||
Spell spell = (Spell) spellObject;
|
||||
if (spell.getSpellAbility() != null) {
|
||||
for (Effect effect : getEffects()) {
|
||||
effect.setValue(SOURCE_CAST_SPELL_ABILITY, spell.getSpellAbility());
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class CounterUnlessPaysEffect extends OneShotEffect {
|
|||
if (mode.getTargets().isEmpty()) {
|
||||
sb.append("counter it");
|
||||
} else {
|
||||
sb.append("Counter target ").append(mode.getTargets().get(0).getTargetName());
|
||||
sb.append("counter target ").append(mode.getTargets().get(0).getTargetName());
|
||||
}
|
||||
sb.append(" unless its controller pays ");
|
||||
if (cost != null) {
|
||||
|
|
|
|||
|
|
@ -277,14 +277,14 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect {
|
|||
if (tapped && !attacking) {
|
||||
sb.append("tapped ");
|
||||
}
|
||||
sb.append("token");
|
||||
sb.append("token that's a copy of target creature");
|
||||
} else {
|
||||
sb.append(number);
|
||||
sb.append(" ");
|
||||
if (tapped && !attacking) {
|
||||
sb.append("tapped ");
|
||||
}
|
||||
sb.append("tokens");
|
||||
sb.append("tokens that are copies of target creature");
|
||||
}
|
||||
if (attacking) {
|
||||
sb.append(" that are");
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -52,6 +51,7 @@ public class ExileAllEffect extends OneShotEffect {
|
|||
public ExileAllEffect(FilterPermanent filter) {
|
||||
this(filter, null, null);
|
||||
}
|
||||
|
||||
public ExileAllEffect(FilterPermanent filter, UUID exileId, String exileZone) {
|
||||
super(Outcome.Exile);
|
||||
this.filter = filter;
|
||||
|
|
@ -77,19 +77,18 @@ public class ExileAllEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
|
||||
for (Permanent permanent: permanents) {
|
||||
for (Permanent permanent : permanents) {
|
||||
controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source.getSourceId(), game, Zone.BATTLEFIELD, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Exile all ").append(filter.getMessage());
|
||||
sb.append("exile all ").append(filter.getMessage());
|
||||
staticText = sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class ExileSourceEffect extends OneShotEffect {
|
|||
*/
|
||||
public ExileSourceEffect(boolean toUniqueExileZone) {
|
||||
super(Outcome.Exile);
|
||||
staticText = "Exile {this}";
|
||||
staticText = "exile {this}";
|
||||
this.toUniqueExileZone = toUniqueExileZone;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.List;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
|
@ -45,7 +46,7 @@ public class GetEmblemEffect extends OneShotEffect {
|
|||
public GetEmblemEffect(Emblem emblem) {
|
||||
super(Outcome.Benefit);
|
||||
this.emblem = emblem;
|
||||
this.staticText = "You get an emblem with \"" + emblem.getAbilities().getRules(null) + '"';
|
||||
this.staticText = getText();
|
||||
}
|
||||
|
||||
public GetEmblemEffect(final GetEmblemEffect effect) {
|
||||
|
|
@ -68,4 +69,22 @@ public class GetEmblemEffect extends OneShotEffect {
|
|||
return true;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("You get an emblem with \"");
|
||||
List<String> rules = emblem.getAbilities().getRules(null);
|
||||
if (rules.size() == 1) {
|
||||
for (String s : rules) {
|
||||
sb.append(s);
|
||||
}
|
||||
sb.append('"');
|
||||
} else if (rules.size() == 2) {
|
||||
for (String s : rules) {
|
||||
sb.append(s);
|
||||
sb.append("\" and \"");
|
||||
}
|
||||
sb.append('"');
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,9 +264,11 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff
|
|||
sb.append(". You may reveal ");
|
||||
sb.append(filter.getMessage()).append(" from among them and put it into your ");
|
||||
} else if (targetPickedCards == Zone.BATTLEFIELD) {
|
||||
sb.append(". You ");
|
||||
sb.append(". ");
|
||||
if (optional) {
|
||||
sb.append("may ");
|
||||
sb.append("You may p");
|
||||
} else {
|
||||
sb.append('P');
|
||||
}
|
||||
sb.append("put ").append(filter.getMessage()).append(" from among them onto the ");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ public class LookLibraryControllerEffect extends OneShotEffect {
|
|||
sb.append(" cards ");
|
||||
}
|
||||
|
||||
sb.append("of your Library");
|
||||
sb.append("of your library");
|
||||
if (numberLook == 0) {
|
||||
sb.append(", where {X} is the number of cards ").append(numberOfCards.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect {
|
|||
sb.append(CardUtil.numberToText(amount));
|
||||
sb.append(" cards ");
|
||||
} else {
|
||||
sb.append(" card ");
|
||||
sb.append("card ");
|
||||
}
|
||||
sb.append("of target player's library");
|
||||
if (putToGraveyard) {
|
||||
|
|
|
|||
|
|
@ -82,27 +82,27 @@ public class NameACardEffect extends OneShotEffect {
|
|||
switch (typeOfName) {
|
||||
case ALL:
|
||||
cardChoice.setChoices(CardRepository.instance.getNames());
|
||||
cardChoice.setMessage("Name a card");
|
||||
cardChoice.setMessage("Choose a card name");
|
||||
break;
|
||||
case NON_ARTIFACT_AND_NON_LAND_NAME:
|
||||
cardChoice.setChoices(CardRepository.instance.getNonArtifactAndNonLandNames());
|
||||
cardChoice.setMessage("Name a non artifact and non land card");
|
||||
cardChoice.setMessage("Choose a nonartifact, nonland card name");
|
||||
break;
|
||||
case NON_LAND_AND_NON_CREATURE_NAME:
|
||||
cardChoice.setChoices(CardRepository.instance.getNonLandAndNonCreatureNames());
|
||||
cardChoice.setMessage("Name a non land and non creature card");
|
||||
cardChoice.setMessage("Choose a nonland and non creature card");
|
||||
break;
|
||||
case NON_LAND_NAME:
|
||||
cardChoice.setChoices(CardRepository.instance.getNonLandNames());
|
||||
cardChoice.setMessage("Name a non land card");
|
||||
cardChoice.setMessage("Choose a nonland card name");
|
||||
break;
|
||||
case CREATURE_NAME:
|
||||
cardChoice.setChoices(CardRepository.instance.getCreatureNames());
|
||||
cardChoice.setMessage("Name a creature card");
|
||||
cardChoice.setMessage("Choose a creature card name");
|
||||
break;
|
||||
case ARTIFACT_NAME:
|
||||
cardChoice.setChoices(CardRepository.instance.getArtifactNames());
|
||||
cardChoice.setMessage("Name an artifact card");
|
||||
cardChoice.setMessage("Choose an artifact card name");
|
||||
break;
|
||||
}
|
||||
cardChoice.clearChoice();
|
||||
|
|
@ -130,7 +130,7 @@ public class NameACardEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
private String setText() {
|
||||
StringBuilder sb = new StringBuilder("name a ");
|
||||
StringBuilder sb = new StringBuilder("choose a ");
|
||||
switch (typeOfName) {
|
||||
case ALL:
|
||||
sb.append("card");
|
||||
|
|
@ -139,7 +139,7 @@ public class NameACardEffect extends OneShotEffect {
|
|||
sb.append("nonartifact, nonland card");
|
||||
break;
|
||||
case NON_LAND_AND_NON_CREATURE_NAME:
|
||||
sb.append("card other than a creature or a land card");
|
||||
sb.append("noncreature, nonland card");
|
||||
break;
|
||||
case NON_LAND_NAME:
|
||||
sb.append("nonland card");
|
||||
|
|
@ -151,6 +151,7 @@ public class NameACardEffect extends OneShotEffect {
|
|||
sb.append("artifact card");
|
||||
break;
|
||||
}
|
||||
sb.append(" name");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import static mage.constants.Duration.EndOfTurn;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
|
|
@ -98,10 +99,19 @@ public class PreventAllDamageByAllPermanentsEffect extends PreventionEffectImpl
|
|||
sb.append("combat ");
|
||||
}
|
||||
sb.append("damage ");
|
||||
sb.append(duration.toString());
|
||||
if (filter != null) {
|
||||
sb.append(" dealt by ");
|
||||
sb.append(filter.getMessage());
|
||||
if (duration == EndOfTurn) {
|
||||
if (filter != null) {
|
||||
sb.append(filter.getMessage());
|
||||
sb.append(" would deal this turn");
|
||||
} else {
|
||||
sb.append("that would be dealt this turn");
|
||||
}
|
||||
} else {
|
||||
sb.append(duration.toString());
|
||||
if (filter != null) {
|
||||
sb.append(" dealt by ");
|
||||
sb.append(filter.getMessage());
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import static mage.constants.Duration.EndOfTurn;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
|
|
@ -74,7 +75,12 @@ public class PreventDamageToSourceEffect extends PreventionEffectImpl {
|
|||
} else {
|
||||
sb.append("Prevent the next ").append(amountToPrevent).append(" damage that would be dealt to ");
|
||||
}
|
||||
sb.append("{source} ").append(duration.toString());
|
||||
sb.append("{source} ");
|
||||
if (duration == EndOfTurn) {
|
||||
sb.append("this turn");
|
||||
} else {
|
||||
sb.append(duration.toString());
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.constants.Duration;
|
||||
|
|
@ -45,23 +44,23 @@ public class PreventDamageToTargetEffect extends PreventionEffectImpl {
|
|||
public PreventDamageToTargetEffect(Duration duration) {
|
||||
this(duration, false);
|
||||
}
|
||||
|
||||
|
||||
public PreventDamageToTargetEffect(Duration duration, boolean onlyCombat) {
|
||||
this(duration, Integer.MAX_VALUE, onlyCombat);
|
||||
}
|
||||
|
||||
|
||||
public PreventDamageToTargetEffect(Duration duration, int amount) {
|
||||
this(duration, amount, false);
|
||||
}
|
||||
|
||||
|
||||
public PreventDamageToTargetEffect(Duration duration, int amount, boolean onlyCombat) {
|
||||
super(duration, amount, onlyCombat);
|
||||
}
|
||||
|
||||
|
||||
public PreventDamageToTargetEffect(Duration duration, boolean onlyCombat, boolean consumable, DynamicValue amountToPreventDynamic) {
|
||||
super(duration, 0, onlyCombat, consumable, amountToPreventDynamic);
|
||||
}
|
||||
|
||||
|
||||
public PreventDamageToTargetEffect(final PreventDamageToTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
|
@ -83,9 +82,9 @@ public class PreventDamageToTargetEffect extends PreventionEffectImpl {
|
|||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (amountToPrevent == Integer.MAX_VALUE) {
|
||||
sb.append("Prevent all damage that would be dealt to target ");
|
||||
sb.append("prevent all damage that would be dealt to target ");
|
||||
} else {
|
||||
sb.append("Prevent the next ").append(amountToPrevent).append(" damage that would be dealt to target ");
|
||||
sb.append("prevent the next ").append(amountToPrevent).append(" damage that would be dealt to target ");
|
||||
}
|
||||
sb.append(mode.getTargets().get(0).getTargetName());
|
||||
if (!duration.toString().isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class PutTopCardOfLibraryIntoGraveTargetEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
private String setText() {
|
||||
StringBuilder sb = new StringBuilder("Target player puts the top ");
|
||||
StringBuilder sb = new StringBuilder("target player puts the top ");
|
||||
if (numberCards.toString().equals("1")) {
|
||||
sb.append(" card");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ public class RevealLibraryPutIntoHandEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
private String setText() {
|
||||
StringBuilder sb = new StringBuilder("Reveal the top ");
|
||||
StringBuilder sb = new StringBuilder("reveal the top ");
|
||||
sb.append(CardUtil.numberToText(amountCards.toString())).append(" cards of your library. Put all ");
|
||||
sb.append(filter.getMessage());
|
||||
sb.append(" revealed this way into your hand and the rest ");
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -60,10 +59,10 @@ public class TapAllTargetPlayerControlsEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
if(player != null) {
|
||||
if (player != null) {
|
||||
filter.add(new ControllerIdPredicate(player.getId()));
|
||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
|
||||
for(Permanent p : permanents) {
|
||||
for (Permanent p : permanents) {
|
||||
p.tap(game);
|
||||
}
|
||||
return true;
|
||||
|
|
@ -78,9 +77,9 @@ public class TapAllTargetPlayerControlsEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if(staticText != null && !staticText.isEmpty()) {
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
return "tap all " + filter.getMessage() + " target player controls";
|
||||
return "tap all " + filter.toString() + " target " + mode.getTargets().get(0).getMessage() + " controls";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class UntapAllThatAttackedEffect extends OneShotEffect {
|
|||
|
||||
public UntapAllThatAttackedEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = " Untap all creatures that attacked this turn";
|
||||
staticText = "Untap all creatures that attacked this turn";
|
||||
}
|
||||
|
||||
public UntapAllThatAttackedEffect(final UntapAllThatAttackedEffect effect) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -38,12 +37,11 @@ import mage.game.permanent.Permanent;
|
|||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class BlocksIfAbleAttachedEffect extends RequirementEffect {
|
||||
|
||||
public BlocksIfAbleAttachedEffect(Duration duration, AttachmentType attachmentType) {
|
||||
super(duration);
|
||||
this.staticText = attachmentType.verb() + " creature blocks each turn if able";
|
||||
this.staticText = attachmentType.verb() + " creature blocks each combat if able";
|
||||
}
|
||||
|
||||
public BlocksIfAbleAttachedEffect(final BlocksIfAbleAttachedEffect effect) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -39,7 +38,6 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class BlocksIfAbleSourceEffect extends RequirementEffect {
|
||||
|
||||
public BlocksIfAbleSourceEffect(Duration duration) {
|
||||
|
|
@ -78,7 +76,7 @@ public class BlocksIfAbleSourceEffect extends RequirementEffect {
|
|||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "{this} blocks each turn if able.";
|
||||
return "{this} blocks each combat if able.";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ package mage.abilities.effects.common.combat;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.constants.Duration;
|
||||
import static mage.constants.Duration.EndOfTurn;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -45,8 +46,9 @@ public class CantBeBlockedByAllTargetEffect extends RestrictionEffect {
|
|||
public CantBeBlockedByAllTargetEffect(FilterCreaturePermanent filterBlockedBy, Duration duration) {
|
||||
super(duration);
|
||||
this.filterBlockedBy = filterBlockedBy;
|
||||
staticText = "Target creature"
|
||||
staticText = "target creature"
|
||||
+ " can't be blocked "
|
||||
+ (duration == EndOfTurn ? "this turn " : "")
|
||||
+ (filterBlockedBy.getMessage().startsWith("except by") ? "" : "by ")
|
||||
+ filterBlockedBy.getMessage();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.Duration;
|
||||
import static mage.constants.Duration.EndOfTurn;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -61,7 +62,9 @@ public class CantBlockAttachedEffect extends RestrictionEffect {
|
|||
if (!filter.getMessage().equals("creature")) {
|
||||
sb.append(' ').append(filter.getMessage());
|
||||
}
|
||||
if (!duration.toString().isEmpty()) {
|
||||
if (duration == EndOfTurn) {
|
||||
sb.append(" this turn");
|
||||
} else if (!duration.toString().isEmpty()) {
|
||||
sb.append(' ').append(duration.toString());
|
||||
}
|
||||
staticText = sb.toString();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -35,35 +34,32 @@ import mage.constants.Duration;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
||||
/**
|
||||
* !! This effect does only support one target.
|
||||
*
|
||||
*
|
||||
* http://tappedout.net/mtg-questions/must-be-blocked-if-able-effect-makes-other-attacking-creatures-essentially-unblockable/
|
||||
*
|
||||
* When you Declare Blockers, you choose an arrangement for your blockers,
|
||||
* then check to see if there are any restrictions or requirements.
|
||||
* When you Declare Blockers, you choose an arrangement for your blockers, then
|
||||
* check to see if there are any restrictions or requirements.
|
||||
*
|
||||
* If any restrictions are violated, the block is illegal. (For example,
|
||||
* trying to block with Sightless Ghoul)
|
||||
* If any requirements are violated, the least possible number of requirements
|
||||
* must be violated, otherwise the block is illegal. (For example, your opponent
|
||||
* control two creatures that he has cast Deadly Allure on, but you control only
|
||||
* one creature. Blocking either one will violate a requirement, "This creature
|
||||
* must be blocked this turn if able", but it will also violate the least
|
||||
* possible number of requirements, thus it is legal.)
|
||||
* If the block is illegal, the game state backs up and you declare blockers
|
||||
* again. (Note that while you can, in some cases, circumvent requirements
|
||||
* such as "This creature must be blocked" or "This creature must block
|
||||
* any attacking creature" you can never circumvent restrictions: "This creature
|
||||
* can't block" or "Only one creature may block this turn.")
|
||||
* Because you declare ALL your blockers at once, THEN check for
|
||||
* restrictions/requirements, you may block Deadly Allure'd creatures
|
||||
* with only one creature, if you choose.
|
||||
* This still works with Lure: This card sets up a requirement that ALL
|
||||
* creatures must block it if able. Any block that violates more than
|
||||
* the minimum number of requirements is still illegal.
|
||||
* If any restrictions are violated, the block is illegal. (For example, trying
|
||||
* to block with Sightless Ghoul) If any requirements are violated, the least
|
||||
* possible number of requirements must be violated, otherwise the block is
|
||||
* illegal. (For example, your opponent control two creatures that he has cast
|
||||
* Deadly Allure on, but you control only one creature. Blocking either one will
|
||||
* violate a requirement, "This creature must be blocked this turn if able", but
|
||||
* it will also violate the least possible number of requirements, thus it is
|
||||
* legal.) If the block is illegal, the game state backs up and you declare
|
||||
* blockers again. (Note that while you can, in some cases, circumvent
|
||||
* requirements such as "This creature must be blocked" or "This creature must
|
||||
* block any attacking creature" you can never circumvent restrictions: "This
|
||||
* creature can't block" or "Only one creature may block this turn.") Because
|
||||
* you declare ALL your blockers at once, THEN check for
|
||||
* restrictions/requirements, you may block Deadly Allure'd creatures with only
|
||||
* one creature, if you choose. This still works with Lure: This card sets up a
|
||||
* requirement that ALL creatures must block it if able. Any block that violates
|
||||
* more than the minimum number of requirements is still illegal.
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
|
@ -75,7 +71,7 @@ public class MustBeBlockedByAtLeastOneTargetEffect extends RequirementEffect {
|
|||
|
||||
public MustBeBlockedByAtLeastOneTargetEffect(Duration duration) {
|
||||
super(duration);
|
||||
staticText = "Target creature must be blocked this turn if able";
|
||||
staticText = "target creature must be blocked this turn if able";
|
||||
}
|
||||
|
||||
public MustBeBlockedByAtLeastOneTargetEffect(final MustBeBlockedByAtLeastOneTargetEffect effect) {
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl {
|
|||
private String setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (chooseLandType) {
|
||||
sb.append("Target land becomes the basic land type of your choice ");
|
||||
sb.append("Target land becomes the basic land type of your choice");
|
||||
} else {
|
||||
sb.append("Target land becomes a ");
|
||||
int i = 1;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class BecomesChosenCreatureTypeTargetEffect extends OneShotEffect {
|
|||
super(Outcome.BoostCreature);
|
||||
this.nonWall = nonWall;
|
||||
if(nonWall) {
|
||||
staticText = "choose a creature type other than wall, target creature's type becomes that type until end of turn";
|
||||
staticText = "choose a creature type other than Wall. Target creature becomes that type until end of turn";
|
||||
}
|
||||
else {
|
||||
staticText = "target creature becomes the creature type of your choice until end of turn";
|
||||
|
|
|
|||
|
|
@ -52,12 +52,13 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl {
|
|||
|
||||
/**
|
||||
* Set the color of a spell or permanent
|
||||
*
|
||||
* @param duration
|
||||
*
|
||||
* @param duration
|
||||
*/
|
||||
public BecomesColorTargetEffect(Duration duration) {
|
||||
this(null, duration, null);
|
||||
}
|
||||
|
||||
public BecomesColorTargetEffect(ObjectColor setColor, Duration duration) {
|
||||
this(setColor, duration, null);
|
||||
}
|
||||
|
|
@ -78,7 +79,7 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (setColor == null) {
|
||||
ChoiceColor choice = new ChoiceColor();
|
||||
while (!choice.isChosen()) {
|
||||
|
|
@ -95,9 +96,8 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl {
|
|||
if (!game.isSimulation()) {
|
||||
game.informPlayers(controller.getLogName() + " has chosen the color: " + setColor.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
super.init(source, game); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
|
|
@ -109,11 +109,11 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
if (setColor != null) {
|
||||
boolean objectFound = false;
|
||||
for (UUID targetId :targetPointer.getTargets(game, source)) {
|
||||
for (UUID targetId : targetPointer.getTargets(game, source)) {
|
||||
MageObject targetObject = game.getObject(targetId);
|
||||
if (targetObject != null) {
|
||||
objectFound = true;
|
||||
targetObject.getColor(game).setColor(setColor);
|
||||
targetObject.getColor(game).setColor(setColor);
|
||||
}
|
||||
}
|
||||
if (!objectFound && this.getDuration() == Duration.Custom) {
|
||||
|
|
@ -143,7 +143,9 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl {
|
|||
} else {
|
||||
sb.append(setColor.getDescription());
|
||||
}
|
||||
sb.append(' ').append(duration.toString());
|
||||
if (!duration.toString().equals("")) {
|
||||
sb.append(' ').append(duration.toString());
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,6 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
|
|||
if (duration.toString() != null && !duration.toString().isEmpty()) {
|
||||
sb.append(duration.toString()).append(", ");
|
||||
}
|
||||
sb.append("all ");
|
||||
sb.append(filter.getMessage());
|
||||
if (duration.toString() != null && duration.toString().isEmpty()) {
|
||||
sb.append(" are ");
|
||||
|
|
@ -147,7 +146,7 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
sb.append(token.getDescription());
|
||||
if (type != null && !type.isEmpty()) {
|
||||
sb.append(". They are still ").append(type);
|
||||
sb.append(". They're still ").append(type);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl {
|
|||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Enchanted creature gets ");
|
||||
sb.append("enchanted creature gets ");
|
||||
String p = power.toString();
|
||||
if (!p.startsWith("-")) {
|
||||
sb.append('+');
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.effects.common.continuous;
|
||||
|
||||
import mage.constants.Duration;
|
||||
|
|
@ -116,21 +115,24 @@ public class BoostEquippedEffect extends ContinuousEffectImpl {
|
|||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Equipped creature gets ");
|
||||
sb.append("equipped creature gets ");
|
||||
String p = power.toString();
|
||||
if (!p.startsWith("-"))
|
||||
if (!p.startsWith("-")) {
|
||||
sb.append('+');
|
||||
}
|
||||
sb.append(p).append('/');
|
||||
String t = toughness.toString();
|
||||
if (!t.startsWith("-")) {
|
||||
if (p.startsWith("-"))
|
||||
if (p.startsWith("-")) {
|
||||
sb.append('-');
|
||||
else
|
||||
} else {
|
||||
sb.append('+');
|
||||
}
|
||||
}
|
||||
sb.append(t);
|
||||
if (duration != Duration.WhileOnBattlefield)
|
||||
if (duration != Duration.WhileOnBattlefield) {
|
||||
sb.append(' ').append(duration.toString());
|
||||
}
|
||||
String message = power.getMessage();
|
||||
if (!message.isEmpty()) {
|
||||
sb.append(" for each ");
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class GainAbilityControlledSpellsEffect extends ContinuousEffectImpl {
|
|||
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||
this.ability = ability;
|
||||
this.filter = filter;
|
||||
staticText = filter.getMessage() + " you cast have " + ability.getRule();
|
||||
staticText = filter.getMessage() + " you cast have " + ability.getRule() + '.';
|
||||
}
|
||||
|
||||
public GainAbilityControlledSpellsEffect(final GainAbilityControlledSpellsEffect effect) {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import mage.filter.FilterPermanent;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -82,7 +83,7 @@ public class AddCountersAllEffect extends OneShotEffect {
|
|||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("put ");
|
||||
if (counter.getCount() > 1) {
|
||||
sb.append(Integer.toString(counter.getCount())).append(' ').append(counter.getName().toLowerCase()).append(" counters on each ");
|
||||
sb.append(CardUtil.numberToText(counter.getCount(), "a")).append(' ').append(counter.getName().toLowerCase()).append(" counters on each ");
|
||||
} else {
|
||||
sb.append("a ").append(counter.getName().toLowerCase()).append(" counter on each ");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,14 +152,20 @@ public class AddCountersSourceEffect extends OneShotEffect {
|
|||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("put ");
|
||||
boolean plural = true;
|
||||
if (counter.getCount() > 1) {
|
||||
sb.append(CardUtil.numberToText(counter.getCount())).append(' ');
|
||||
} else if (amount.toString().equals("X") && amount.getMessage().isEmpty()) {
|
||||
sb.append("X ");
|
||||
} else {
|
||||
sb.append("a ");
|
||||
plural = false;
|
||||
}
|
||||
sb.append(counter.getName().toLowerCase()).append(" counter on {this}");
|
||||
sb.append(counter.getName().toLowerCase()).append(" counter");
|
||||
if (plural) {
|
||||
sb.append('s');
|
||||
}
|
||||
sb.append(" on {this}");
|
||||
if (!amount.getMessage().isEmpty()) {
|
||||
sb.append(" for each ").append(amount.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public class DiscardTargetEffect extends OneShotEffect {
|
|||
}
|
||||
sb.append(" discards ");
|
||||
if (amount.toString().equals("1")) {
|
||||
sb.append(" a card");
|
||||
sb.append("a card");
|
||||
} else {
|
||||
sb.append(CardUtil.numberToText(amount.toString())).append(" cards");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class SearchLibraryGraveyardPutInHandEffect extends OneShotEffect {
|
|||
super(Outcome.Benefit);
|
||||
this.filter = filter;
|
||||
this.forceToSearchBoth = forceToSearchBoth;
|
||||
staticText = "search your library and" + (forceToSearchBoth ? "" : "/or ") + " graveyard for a card named " + filter.getMessage()
|
||||
staticText = "search your library and" + (forceToSearchBoth ? "" : "/or") + " graveyard for a card named " + filter.getMessage()
|
||||
+ ", reveal it, and put it into your hand. " + (forceToSearchBoth ? "Then shuffle your library" : "If you search your library this way, shuffle it");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -106,9 +107,9 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect {
|
|||
sb.append("search your library for ");
|
||||
if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
|
||||
if (target.getMaxNumberOfTargets() == Integer.MAX_VALUE) {
|
||||
sb.append("any number of ").append(' ');
|
||||
sb.append("any number of ");
|
||||
} else {
|
||||
sb.append("up to ").append(target.getMaxNumberOfTargets()).append(' ');
|
||||
sb.append("up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' ');
|
||||
}
|
||||
sb.append(target.getTargetName()).append(" and put them onto the battlefield");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect
|
|||
@Override
|
||||
public String getText(Mode mode) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Search ").append(this.searchWhatText);
|
||||
sb.append("search ").append(this.searchWhatText);
|
||||
sb.append(" graveyard, hand, and library for ");
|
||||
sb.append(this.searchForText);
|
||||
sb.append(" and exile them. Then that player shuffles his or her library");
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ public class BolsterEffect extends OneShotEffect {
|
|||
} else {
|
||||
sb.append("X, where X is the number of ");
|
||||
sb.append(amount.getMessage());
|
||||
sb.append(". (Choose a creature with the least toughness among creatures you control and put X +1/+1 counters on it.)");
|
||||
sb.append(" (Choose a creature with the least toughness among creatures you control and put X +1/+1 counters on it.)");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostsImpl;
|
||||
import mage.abilities.costs.OrCost;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
|
@ -70,9 +71,11 @@ public class CumulativeUpkeepAbility extends BeginningOfUpkeepTriggeredAbility {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
StringBuilder sb = new StringBuilder("Cumulative upkeep ");
|
||||
if (!(cumulativeCost instanceof ManaCost)) {
|
||||
sb.append("— ");
|
||||
StringBuilder sb = new StringBuilder("Cumulative upkeep");
|
||||
if (!(cumulativeCost instanceof ManaCost || cumulativeCost instanceof OrCost)) {
|
||||
sb.append("—");
|
||||
} else {
|
||||
sb.append(' ');
|
||||
}
|
||||
sb.append(cumulativeCost.getText());
|
||||
return sb.toString();
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ public class DashAbility extends StaticAbility implements AlternativeSourceCosts
|
|||
new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.Custom, false),
|
||||
DashedCondition.instance, "", "");
|
||||
ability.addEffect(new DashAddDelayedTriggeredAbilityEffect());
|
||||
ability.setRuleVisible(false);
|
||||
addSubAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -40,7 +39,7 @@ import java.io.ObjectStreamException;
|
|||
*/
|
||||
public class DeathtouchAbility extends StaticAbility implements MageSingleton {
|
||||
|
||||
private static final DeathtouchAbility instance = new DeathtouchAbility();
|
||||
private static final DeathtouchAbility instance = new DeathtouchAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
|
|
@ -56,7 +55,7 @@ public class DeathtouchAbility extends StaticAbility implements MageSingleton {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Deathtouch <i>(Any amount of damage this deals to a creature is enough to destroy it.)</i>";
|
||||
return "deathtouch";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -64,6 +63,4 @@ public class DeathtouchAbility extends StaticAbility implements MageSingleton {
|
|||
return instance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,11 +24,9 @@
|
|||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.EvasionAbility;
|
||||
|
|
@ -45,7 +43,7 @@ import java.io.ObjectStreamException;
|
|||
*/
|
||||
public class FearAbility extends EvasionAbility implements MageSingleton {
|
||||
|
||||
private static final FearAbility instance = new FearAbility();
|
||||
private static final FearAbility instance = new FearAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
|
|
@ -61,7 +59,7 @@ public class FearAbility extends EvasionAbility implements MageSingleton {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Fear";
|
||||
return "fear";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -102,4 +100,4 @@ class FearEffect extends RestrictionEffect implements MageSingleton {
|
|||
return new FearEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
|
|
@ -11,12 +10,9 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
|
||||
/**
|
||||
* @author Plopman
|
||||
*/
|
||||
|
||||
|
||||
public class FlankingAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public FlankingAbility() {
|
||||
|
|
@ -37,9 +33,8 @@ public class FlankingAbility extends TriggeredAbilityImpl {
|
|||
if (event.getTargetId().equals(this.getSourceId())) {
|
||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
if (permanent != null) {
|
||||
boolean hasFlankingAbility =
|
||||
permanent.getAbilities().stream().anyMatch(ability -> ability instanceof FlankingAbility);
|
||||
|
||||
boolean hasFlankingAbility
|
||||
= permanent.getAbilities().stream().anyMatch(ability -> ability instanceof FlankingAbility);
|
||||
|
||||
if (!hasFlankingAbility) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
|
|
@ -54,7 +49,7 @@ public class FlankingAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Flanking";
|
||||
return "flanking";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -62,5 +57,4 @@ public class FlankingAbility extends TriggeredAbilityImpl {
|
|||
return new FlankingAbility(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@
|
|||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -46,7 +45,7 @@ import java.io.ObjectStreamException;
|
|||
*/
|
||||
public class FlyingAbility extends EvasionAbility implements MageSingleton {
|
||||
|
||||
private static final FlyingAbility instance = new FlyingAbility();
|
||||
private static final FlyingAbility instance = new FlyingAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
|
|
@ -62,7 +61,7 @@ public class FlyingAbility extends EvasionAbility implements MageSingleton {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Flying";
|
||||
return "flying";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -91,7 +90,7 @@ class FlyingEffect extends RestrictionEffect implements MageSingleton {
|
|||
public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) {
|
||||
return blocker.getAbilities().containsKey(FlyingAbility.getInstance().getId())
|
||||
|| blocker.getAbilities().containsKey(ReachAbility.getInstance().getId())
|
||||
|| (game.getContinuousEffects().asThough(blocker.getId(), AsThoughEffectType.BLOCK_DRAGON, source, blocker.getControllerId(), game) && attacker.hasSubtype(SubType.DRAGON, game)) ;
|
||||
|| (game.getContinuousEffects().asThough(blocker.getId(), AsThoughEffectType.BLOCK_DRAGON, source, blocker.getControllerId(), game) && attacker.hasSubtype(SubType.DRAGON, game));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -32,15 +32,15 @@ import mage.constants.Zone;
|
|||
import mage.abilities.StaticAbility;
|
||||
|
||||
/**
|
||||
* OLD RULES:
|
||||
* 700.4. If a permanent is indestructible, rules and effects can't destroy it. (See rule 701.6, "Destroy.")
|
||||
* Such permanents are not destroyed by lethal damage, and they ignore the lethal-damage state-based action
|
||||
* (see rule 704.5g). Rules or effects may cause an indestructible permanent to be sacrificed, put into a
|
||||
* graveyard, or exiled. #
|
||||
* OLD RULES: 700.4. If a permanent is indestructible, rules and effects can't
|
||||
* destroy it. (See rule 701.6, "Destroy.") Such permanents are not destroyed by
|
||||
* lethal damage, and they ignore the lethal-damage state-based action (see rule
|
||||
* 704.5g). Rules or effects may cause an indestructible permanent to be
|
||||
* sacrificed, put into a graveyard, or exiled. #
|
||||
*
|
||||
* 700.4a Although the text "[This permanent] is indestructible" is an ability, actually being
|
||||
* indestructible is neither an ability nor a characteristic. It's just something that's true
|
||||
* about a permanent.
|
||||
* 700.4a Although the text "[This permanent] is indestructible" is an ability,
|
||||
* actually being indestructible is neither an ability nor a characteristic.
|
||||
* It's just something that's true about a permanent.
|
||||
*
|
||||
* NEW RULES
|
||||
*
|
||||
|
|
@ -48,10 +48,9 @@ import mage.abilities.StaticAbility;
|
|||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
||||
public class IndestructibleAbility extends StaticAbility {
|
||||
|
||||
private static final IndestructibleAbility instance;
|
||||
|
|
@ -79,7 +78,7 @@ public class IndestructibleAbility extends StaticAbility {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Indestructible";
|
||||
return "indestructible";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,11 @@ public class MorphAbility extends StaticAbility implements AlternativeSourceCost
|
|||
break;
|
||||
}
|
||||
}
|
||||
sb.append(morphCosts.getText()).append(' ');
|
||||
sb.append(morphCosts.getText());
|
||||
if (!(morphCosts.get(morphCosts.size() - 1) instanceof ManaCosts)) {
|
||||
sb.append('.');
|
||||
}
|
||||
sb.append(' ');
|
||||
if (megamorph) {
|
||||
sb.append(REMINDER_TEXT_MEGA);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import mage.MageObject;
|
|||
import mage.ObjectColor;
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class RampageAbility extends BecomesBlockedTriggeredAbility {
|
|||
|
||||
public RampageAbility(int amount) {
|
||||
super(null, false);
|
||||
rule = "rampage " + amount + "(Whenever this creature becomes blocked, it gets +"
|
||||
rule = "rampage " + amount + " (Whenever this creature becomes blocked, it gets +"
|
||||
+ amount + "/+" + amount + " until end of turn for each creature blocking it beyond the first.)";
|
||||
RampageValue rv = new RampageValue(amount);
|
||||
this.addEffect(new BoostSourceEffect(rv, rv, Duration.EndOfTurn, true));
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@
|
|||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -40,7 +39,7 @@ import java.io.ObjectStreamException;
|
|||
*/
|
||||
public class ReachAbility extends StaticAbility implements MageSingleton {
|
||||
|
||||
private static final ReachAbility instance = new ReachAbility();
|
||||
private static final ReachAbility instance = new ReachAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
|
|
@ -56,7 +55,7 @@ public class ReachAbility extends StaticAbility implements MageSingleton {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Reach";
|
||||
return "reach";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -56,13 +56,11 @@ public class RippleAbility extends TriggeredAbilityImpl {
|
|||
return new RippleAbility(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Ripple " + rippleNumber + " <i>(When you cast this spell, you may reveal the top " + CardUtil.numberToText(rippleNumber) + " cards of your library. You may cast any revealed cards with the same name as this spell without paying their mana costs. Put the rest on the bottom of your library.)</i>";
|
||||
return "ripple " + rippleNumber + " <i>(When you cast this spell, you may reveal the top " + CardUtil.numberToText(rippleNumber) + " cards of your library. You may cast any revealed cards with the same name as this spell without paying their mana costs. Put the rest on the bottom of your library.)</i>";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class RippleEffect extends OneShotEffect {
|
||||
|
|
@ -84,13 +82,12 @@ class RippleEffect extends OneShotEffect {
|
|||
return new RippleEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (player != null) {
|
||||
if (!player.chooseUse(Outcome.Neutral, "Reveal " + rippleNumber + " cards from the top of your library?", source, game)){
|
||||
if (!player.chooseUse(Outcome.Neutral, "Reveal " + rippleNumber + " cards from the top of your library?", source, game)) {
|
||||
return true; //fizzle
|
||||
}
|
||||
// reveal to/**/p cards from library
|
||||
|
|
@ -123,4 +120,3 @@ class RippleEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,10 +12,12 @@ import mage.game.permanent.Permanent;
|
|||
|
||||
/**
|
||||
* "Shadow" keyword
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class ShadowAbility extends EvasionAbility implements MageSingleton {
|
||||
private static final ShadowAbility instance = new ShadowAbility();
|
||||
|
||||
private static final ShadowAbility instance = new ShadowAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
|
|
@ -31,7 +33,7 @@ public class ShadowAbility extends EvasionAbility implements MageSingleton {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Shadow <i>(This creature can block or be blocked by only creatures with shadow.)</i>";
|
||||
return "shadow <i>(This creature can block or be blocked by only creatures with shadow.)</i>";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class ShroudAbility extends StaticAbility implements MageSingleton {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Shroud";
|
||||
return "shroud";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ public class SuspendAbility extends SpecialAction {
|
|||
}
|
||||
StringBuilder sb = new StringBuilder("Suspend ");
|
||||
if (cost != null) {
|
||||
sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append(" - ").append(cost.getText());
|
||||
sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append(" - ").append(cost.getText()).append(suspend == Integer.MAX_VALUE ? ". X can't be 0" : "");
|
||||
if (!shortRule) {
|
||||
sb.append(" <i>(Rather than cast this card from your hand, pay ")
|
||||
.append(cost.getText())
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -40,7 +39,7 @@ import java.io.ObjectStreamException;
|
|||
*/
|
||||
public class VigilanceAbility extends StaticAbility implements MageSingleton {
|
||||
|
||||
private static final VigilanceAbility instance = new VigilanceAbility();
|
||||
private static final VigilanceAbility instance = new VigilanceAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
|
|
@ -56,7 +55,7 @@ public class VigilanceAbility extends StaticAbility implements MageSingleton {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Vigilance";
|
||||
return "vigilance";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@
|
|||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -37,19 +36,24 @@ import java.io.ObjectStreamException;
|
|||
/**
|
||||
* 702.77. Wither
|
||||
*
|
||||
* 702.77a. Wither is a static ability. Damage dealt to a creature by a source with wither isn't marked on that creature. Rather, it causes that many -1/-1 counters to be put on that creature. See rule 119.3.
|
||||
* 702.77a. Wither is a static ability. Damage dealt to a creature by a source
|
||||
* with wither isn't marked on that creature. Rather, it causes that many -1/-1
|
||||
* counters to be put on that creature. See rule 119.3.
|
||||
*
|
||||
* 702.77b. If a permanent leaves the battlefield before an effect causes it to deal damage, its last known information is used to determine whether it had wither.
|
||||
* 702.77b. If a permanent leaves the battlefield before an effect causes it to
|
||||
* deal damage, its last known information is used to determine whether it had
|
||||
* wither.
|
||||
*
|
||||
* 702.77c. The wither rules function no matter what zone an object with wither deals damage from.
|
||||
* 702.77c. The wither rules function no matter what zone an object with wither
|
||||
* deals damage from.
|
||||
*
|
||||
* 702.77d. Multiple instances of wither on the same object are redundant.
|
||||
* 702.77d. Multiple instances of wither on the same object are redundant.
|
||||
*
|
||||
* @author nantuko
|
||||
* @author nantuko
|
||||
*/
|
||||
public class WitherAbility extends StaticAbility implements MageSingleton {
|
||||
|
||||
private static final WitherAbility instance = new WitherAbility();
|
||||
private static final WitherAbility instance = new WitherAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
|
|
@ -65,7 +69,7 @@ public class WitherAbility extends StaticAbility implements MageSingleton {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Wither <i>(This deals damage to creatures in the form of -1/-1 counters.)</i>";
|
||||
return "wither <i>(This deals damage to creatures in the form of -1/-1 counters.)</i>";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public final class StaticFilters {
|
|||
public static final FilterCreaturePermanent FILTER_PERMANENT_A_CREATURE = new FilterCreaturePermanent("a creature");
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURES = new FilterCreaturePermanent("creatures");
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent(SubType.GOBLIN, "Goblin creatures");
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "Sliver creatures");
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "all Sliver creatures");
|
||||
public static final FilterPlaneswalkerPermanent FILTER_PERMANENT_PLANESWALKER = new FilterPlaneswalkerPermanent();
|
||||
|
||||
public static final FilterPermanent FILTER_PERMANENT_NON_LAND = new FilterNonlandPermanent();
|
||||
|
|
@ -69,6 +69,7 @@ public final class StaticFilters {
|
|||
= (FilterSpell) new FilterSpell("noncreature spell").add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
|
||||
public static final FilterSpell FILTER_SPELL = new FilterSpell();
|
||||
public static final FilterSpell FILTER_A_SPELL = new FilterSpell("a spell");
|
||||
|
||||
public static final FilterSpell FILTER_INSTANT_OR_SORCERY_SPELL = new FilterSpell("instant or sorcery spell");
|
||||
public static final FilterSpell FILTER_INSTANT_OR_SORCERY_SPELLS = new FilterSpell("instant or sorcery spells");
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@
|
|||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.filter.common;
|
||||
|
||||
import mage.filter.predicate.permanent.BlockingPredicate;
|
||||
|
|
@ -37,7 +36,7 @@ import mage.filter.predicate.permanent.BlockingPredicate;
|
|||
public class FilterBlockingCreature extends FilterCreaturePermanent {
|
||||
|
||||
public FilterBlockingCreature() {
|
||||
this("Blocking creature");
|
||||
this("blocking creature");
|
||||
}
|
||||
|
||||
public FilterBlockingCreature(String name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue