mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
text improvements
This commit is contained in:
parent
52530b173d
commit
fc3551fc0a
6 changed files with 38 additions and 31 deletions
|
|
@ -13,6 +13,7 @@ import mage.constants.*;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.FilterPermanentThisOrAnother;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
|
|
@ -27,12 +28,9 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public final class HenryWuInGenGeneticist extends CardImpl {
|
||||
|
||||
public static final FilterPermanent filterYourHumans = new FilterCreaturePermanent("Human creatures you control");
|
||||
|
||||
static {
|
||||
filterYourHumans.add(TargetController.YOU.getControllerPredicate());
|
||||
filterYourHumans.add(SubType.HUMAN.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanentThisOrAnother(
|
||||
new FilterCreaturePermanent(SubType.HUMAN, "Human creatures"), true,
|
||||
"{this} and other Human creatures you control");
|
||||
|
||||
public HenryWuInGenGeneticist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}{U}");
|
||||
|
|
@ -44,8 +42,8 @@ public final class HenryWuInGenGeneticist extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Henry Wu, InGen Geneticist and other Human creatures you control have exploit.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(
|
||||
new ExploitAbility(), Duration.WhileOnBattlefield, filterYourHumans)));
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||
new ExploitAbility(), Duration.WhileOnBattlefield, filter)));
|
||||
|
||||
// Whenever a creature you control exploits a non-Human creature, draw a card. If the exploited creature had power 3 or greater, create a Treasure token.
|
||||
this.addAbility(new HenryWuInGenGeneticistTriggeredAbility());
|
||||
|
|
@ -89,16 +87,13 @@ class HenryWuInGenGeneticistTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent exploiter = game.getPermanentOrLKIBattlefield(event.getSourceId());
|
||||
Permanent exploited = game.getPermanentOrLKIBattlefield(event.getTargetId());
|
||||
|
||||
if (exploiter == null || exploited == null){
|
||||
return false;
|
||||
}
|
||||
|
||||
getEffects().setTargetPointer(new FixedTarget(exploited.getId(), game));
|
||||
|
||||
return exploiter.isCreature(game)
|
||||
if (exploiter != null && exploited != null && exploiter.isCreature(game)
|
||||
&& exploiter.isControlledBy(this.getControllerId())
|
||||
&& filterNonHumans.match(exploited, getControllerId(), this, game);
|
||||
&& filterNonHumans.match(exploited, getControllerId(), this, game)) {
|
||||
getEffects().setTargetPointer(new FixedTarget(exploited.getId(), game));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -109,7 +104,7 @@ class HenryWuInGenGeneticistTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
class HenryWuInGenGeneticistEffect extends CreateTokenEffect {
|
||||
|
||||
public HenryWuInGenGeneticistEffect() {
|
||||
HenryWuInGenGeneticistEffect() {
|
||||
super(new TreasureToken());
|
||||
staticText = "If the exploited creature had power 3 or greater, create a Treasure token.";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public final class NemesisOfMortals extends CardImpl {
|
|||
// {7}{G}{G}: Monstrosity 5. This ability costs {1} less to activate for each creature card in your graveyard.
|
||||
this.addAbility(new MonstrosityAbility("{7}{G}{G}", 5,
|
||||
NemesisOfMortalsAdjuster.instance,
|
||||
"This ability costs {1} less to activate for each creature card in your graveyard"));
|
||||
"This ability costs {1} less to activate for each creature card in your graveyard. "));
|
||||
}
|
||||
|
||||
private NemesisOfMortals(final NemesisOfMortals card) {
|
||||
|
|
|
|||
|
|
@ -55,14 +55,12 @@ public class AddCountersPlayersEffect extends OneShotEffect {
|
|||
case ANY:
|
||||
return game.getState().getPlayersInRange(source.getControllerId(), game);
|
||||
case YOU:
|
||||
return Arrays.asList(source.getControllerId());
|
||||
return Collections.singletonList(source.getControllerId());
|
||||
case CONTROLLER_ATTACHED_TO:
|
||||
List<UUID> list = new ArrayList<>();
|
||||
Optional.ofNullable(source.getSourcePermanentOrLKI(game))
|
||||
.filter(Objects::nonNull)
|
||||
.map(Permanent::getAttachedTo)
|
||||
.map(game::getControllerId)
|
||||
.filter(Objects::nonNull)
|
||||
.ifPresent(list::add);
|
||||
return list;
|
||||
default:
|
||||
|
|
@ -117,8 +115,11 @@ public class AddCountersPlayersEffect extends OneShotEffect {
|
|||
default:
|
||||
throw new UnsupportedOperationException(targetController + " not supported");
|
||||
}
|
||||
sb.append(' ');
|
||||
if (amount.toString().equals("X")) {
|
||||
sb.append("X ").append(counter.getName()).append(" counters");
|
||||
} else {
|
||||
sb.append(counter.getDescription());
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import java.util.UUID;
|
|||
public class AddCountersTargetEffect extends OneShotEffect {
|
||||
|
||||
private Counter counter;
|
||||
private DynamicValue amount;
|
||||
private final DynamicValue amount;
|
||||
|
||||
public AddCountersTargetEffect(Counter counter) {
|
||||
this(counter, counter.getName().equals(CounterType.M1M1.getName()) ? Outcome.UnboostCreature : Outcome.Benefit);
|
||||
|
|
|
|||
|
|
@ -14,11 +14,13 @@ public class FilterPermanentThisOrAnother extends FilterPermanent {
|
|||
public FilterPermanentThisOrAnother(FilterPermanent otherFilter, boolean onlyControlled) {
|
||||
this(otherFilter, onlyControlled, generateFilterMessage(otherFilter));
|
||||
}
|
||||
|
||||
public FilterPermanentThisOrAnother(FilterPermanent otherFilter, boolean onlyControlled, String name) {
|
||||
super(name);
|
||||
this.otherFilter = otherFilter;
|
||||
this.onlyControlled = onlyControlled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Permanent permanent, UUID playerId, Ability source, Game game) {
|
||||
if (!super.match(permanent, playerId, source, game)) {
|
||||
|
|
|
|||
|
|
@ -916,7 +916,14 @@ public final class CardUtil {
|
|||
}
|
||||
|
||||
public static String getAddRemoveCountersText(DynamicValue amount, Counter counter, String description, boolean add) {
|
||||
StringBuilder sb = new StringBuilder(add ? "put " : "remove ");
|
||||
boolean targetPlayerGets = add && (description.endsWith("player") || description.endsWith("opponent"));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (targetPlayerGets) {
|
||||
sb.append(description);
|
||||
sb.append(" gets ");
|
||||
} else {
|
||||
sb.append(add ? "put " : "remove ");
|
||||
}
|
||||
boolean xValue = amount.toString().equals("X");
|
||||
if (xValue) {
|
||||
sb.append("X ").append(counter.getName()).append(" counters");
|
||||
|
|
@ -925,7 +932,9 @@ public final class CardUtil {
|
|||
} else {
|
||||
sb.append(counter.getDescription());
|
||||
}
|
||||
if (!targetPlayerGets) {
|
||||
sb.append(add ? " on " : " from ").append(description);
|
||||
}
|
||||
if (!amount.getMessage().isEmpty()) {
|
||||
sb.append(xValue ? ", where X is " : " for each ").append(amount.getMessage());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue