mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
[J25] various text fixes
This commit is contained in:
parent
cfd51d7dce
commit
1ab9eeaad8
17 changed files with 101 additions and 134 deletions
|
|
@ -1,54 +0,0 @@
|
|||
package mage.abilities.condition.common;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ControlsPermanentGreatestCMCCondition implements Condition {
|
||||
|
||||
private final FilterPermanent filter;
|
||||
|
||||
public ControlsPermanentGreatestCMCCondition() {
|
||||
this(new FilterPermanent());
|
||||
}
|
||||
|
||||
public ControlsPermanentGreatestCMCCondition(FilterPermanent filter) {
|
||||
super();
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Set<UUID> controllers = new HashSet<>();
|
||||
Integer maxCMC = null;
|
||||
|
||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source, game);
|
||||
for (Permanent permanent : permanents) {
|
||||
int cmc = permanent.getManaCost().manaValue();
|
||||
if (maxCMC == null || cmc > maxCMC) {
|
||||
maxCMC = cmc;
|
||||
controllers.clear();
|
||||
}
|
||||
if (cmc == maxCMC) {
|
||||
controllers.add(permanent.getControllerId());
|
||||
}
|
||||
}
|
||||
return controllers.contains(source.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "you control the " + filter.getMessage() + " with the highest mana value or tied for the highest mana value";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -11,14 +11,14 @@ import mage.constants.SubType;
|
|||
public final class FishToken extends TokenImpl {
|
||||
|
||||
public FishToken() {
|
||||
super("Fish Token", "1/1 blue Fish creature token with \"This creature can't be blocked.\"");
|
||||
super("Fish Token", "1/1 blue Fish creature token with \"This token can't be blocked.\"");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.FISH);
|
||||
color.setBlue(true);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
addAbility(new CantBeBlockedSourceAbility("this creature can't be blocked"));
|
||||
addAbility(new CantBeBlockedSourceAbility("this token can't be blocked"));
|
||||
}
|
||||
|
||||
private FishToken(final FishToken token) {
|
||||
|
|
|
|||
|
|
@ -980,7 +980,7 @@ public final class CardUtil {
|
|||
}
|
||||
if (!targetPlayerGets) {
|
||||
sb.append(add ? " on " : " from ");
|
||||
if (description.contains("up to")) {
|
||||
if (description.contains("up to") && !description.contains("up to one")) {
|
||||
sb.append("each of ");
|
||||
}
|
||||
sb.append(description);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue