Merge pull request #2 from magefree/master

merge
This commit is contained in:
Oleg Agafonov 2017-11-17 00:02:29 +04:00 committed by GitHub
commit 890b7fd703
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 7 deletions

View file

@ -68,7 +68,7 @@ class AcidicSoilEffect extends OneShotEffect {
AcidicSoilEffect() {
super(Outcome.Damage);
staticText = "Acidic Soil deals damage to each player equal to the number of lands he or she controls";
staticText = "{this} deals damage to each player equal to the number of lands he or she controls";
}
AcidicSoilEffect(final AcidicSoilEffect effect) {

View file

@ -99,7 +99,13 @@ class HubrisReturnEffect extends OneShotEffect {
for (UUID targetId : targetPointer.getTargets(game, source)) {
Permanent creature = game.getPermanent(targetId);
if (creature != null) {
Cards cardsToHand = new CardsImpl(creature.getAttachments());
Cards cardsToHand = new CardsImpl();
for (UUID cardId : creature.getAttachments()) {
Permanent card = game.getPermanent(cardId);
if (card != null && card.hasSubtype(SubType.AURA, game)) {
cardsToHand.add(card);
}
}
cardsToHand.add(creature);
controller.moveCards(cardsToHand, Zone.HAND, source, game);
}

View file

@ -48,8 +48,10 @@ import mage.constants.Outcome;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.counters.BoostCounter;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent;
@ -61,6 +63,12 @@ import mage.target.common.TargetCreatureOrPlayer;
*/
public class KrovikanPlague extends CardImpl {
private static final FilterControlledCreaturePermanent filterNonWall = new FilterControlledCreaturePermanent("non-Wall creature you control");
static {
filterNonWall.add(Predicates.not(new SubtypePredicate(SubType.WALL)));
}
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("enchanted creature is untapped");
static {
@ -71,8 +79,8 @@ public class KrovikanPlague extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
this.subtype.add(SubType.AURA);
// Enchant creature you control
TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
// Enchant non-Wall creature you control
TargetPermanent auraTarget = new TargetControlledCreaturePermanent(filterNonWall);
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());

View file

@ -59,7 +59,7 @@ public class AtTheBeginOfNextEndStepDelayedTriggeredAbility extends DelayedTrigg
}
public AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone zone, Effect effect, TargetController targetController, Condition condition) {
super(effect, Duration.EndOfTurn);
super(effect, Duration.Custom);
this.zone = zone;
this.targetController = targetController;
this.condition = condition;

View file

@ -73,9 +73,11 @@ public class BecomesColorOrColorsTargetEffect extends OneShotEffect {
if (controller != null && target != null) {
for (int i = 0; i < 5; i++) {
if (i > 0) {
if (!controller.chooseUse(Outcome.Neutral, "Do you wish to choose another color?", source, game)) {
break;
}
}
ChoiceColor choiceColor = new ChoiceColor();
controller.choose(Outcome.Benefit, choiceColor, game);
if (!controller.canRespond()) {