@Override protected int getInputValue(MageObject input) { return input.getPower().getValue(); }
@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(); }
@Override public boolean apply(MageObject input, Game game) { return input.getPower().getValue() != input.getToughness().getValue(); }
@Override public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) { mageObject.removePTCDA(); mageObject.getPower().modifyBaseValue(7); mageObject.getToughness().modifyBaseValue(7); return true; }
@Override public boolean apply(Game game, Ability source) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { int value = amount.calculate(game, source, this); mageObject.getPower().setValue(value); return true; } return false; }
@Override public boolean apply(Game game, Ability source) { MageObject sourceObject = source.getSourceObject(game); if (sourceObject != null) { if (sourceObject.getPower().getValue() >= 10) { game.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), source); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { MageObject target = game.getObject(source.getSourceId()); if (target != null) { Set<CardType> foundCardTypes = EnumSet.noneOf(CardType.class); for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { for (Card card : player.getGraveyard().getCards(game)) { foundCardTypes.addAll(card.getCardType()); } } } int number = foundCardTypes.size(); target.getPower().setValue(number); target.getToughness().setValue(number + 1); return true; } } return false; }
@Override public boolean apply(Game game, Ability source) { MageObject mageObject = game.getPermanentEntering(source.getSourceId()); if (mageObject == null) { if (duration == Duration.Custom || isTemporary()) { mageObject = game.getPermanent(source.getSourceId()); } else { mageObject = game.getObject(source.getSourceId()); } } if (mageObject == null) { discard(); return true; } if (amount != null) { int value = amount.calculate(game, source, this); mageObject.getPower().setValue(value); mageObject.getToughness().setValue(value); return true; } else { if (power != Integer.MIN_VALUE) { mageObject.getPower().setValue(power); } if (toughness != Integer.MIN_VALUE) { mageObject.getToughness().setValue(toughness); } } return true; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (sourceObject != null && controller != null) { Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); if (targetCreature != null && targetCreature.getPower().getValue() < sourceObject.getPower().getValue()) { controller.moveCards(targetCreature, Zone.HAND, source, game); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { MageObject target = game.getObject(source.getSourceId()); if (target != null) { UUID playerId = (UUID) game.getState().getValue(source.getSourceId().toString() + ChooseOpponentEffect.VALUE_KEY); FilterLandPermanent filter = FilterLandPermanent.nonbasicLand(); filter.add(new ControllerIdPredicate(playerId)); int number = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this); target.getPower().setValue(number); target.getToughness().setValue(number); return true; } } return false; } }
if (object instanceof Permanent) { this.mageObjectType = MageObjectType.PERMANENT; this.power = Integer.toString(object.getPower().getValue()); this.toughness = Integer.toString(object.getToughness().getValue()); this.loyalty = Integer.toString(((Permanent) object).getCounters((Game) null).getCount(CounterType.LOYALTY)); } else { this.power = object.getPower().toString(); this.toughness = object.getToughness().toString(); this.loyalty = "";
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { int number = 0; for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { number += player.getGraveyard().count(new FilterCreatureCard(), game); } } mageObject.getPower().setValue(number); mageObject.getToughness().setValue(number + 1); return true; } } return false; }
public static void setPermanentToFaceDownCreature(MageObject mageObject) { mageObject.getPower().modifyBaseValue(2); mageObject.getToughness().modifyBaseValue(2); mageObject.getAbilities().clear(); mageObject.getColor(null).setColor(new ObjectColor()); mageObject.setName(""); mageObject.getCardType().clear(); mageObject.addCardType(CardType.CREATURE); mageObject.getSubtype(null).clear(); mageObject.getSuperType().clear(); mageObject.getManaCost().clear(); if (mageObject instanceof Permanent) { ((Permanent) mageObject).setExpansionSetCode(""); ((Permanent) mageObject).setRarity(Rarity.SPECIAL); } } }
target.getPower().modifyBaseValue(sourceObj.getPower().getBaseValueModified()); target.getToughness().modifyBaseValue(sourceObj.getToughness().getBaseValueModified());
permanent.getPower().setValue(copyFromObject.getPower().getValue()); permanent.getToughness().setValue(copyFromObject.getToughness().getValue()); if (copyFromObject instanceof Permanent) {