* Daretti, Ingenious Iconoclast - Fixed wrong third text (fixes #4405).

This commit is contained in:
LevelX2 2018-01-13 09:25:31 +01:00
parent 7ade17595d
commit 83528369ee
2 changed files with 18 additions and 9 deletions

View file

@ -33,15 +33,15 @@ import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterArtifactCard;
@ -88,7 +88,8 @@ public class DarettiIngeniousIconoclast extends CardImpl {
// -6: Choose target artifact card in a graveyard or artifact on the battlefield. Create three tokens that are copies of it.
ability = new LoyaltyAbility(
new CreateTokenCopyTargetEffect(null, null, false, 3),
new CreateTokenCopyTargetEffect(null, null, false, 3)
.setText("Choose target artifact card in a graveyard or artifact on the battlefield. Create three tokens that are copies of it"),
-6);
ability.addTarget(new TargetCardInGraveyardOrBattlefield(new FilterArtifactCard("artifact card in a graveyard or artifact on the battlefield")));
this.addAbility(ability);

View file

@ -27,6 +27,9 @@
*/
package mage.abilities.effects.common;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.MageObject;
import mage.ObjectColor;
import mage.abilities.Ability;
@ -48,10 +51,6 @@ import mage.util.CardUtil;
import mage.util.functions.ApplyToPermanent;
import mage.util.functions.EmptyApplyToPermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
@ -277,15 +276,24 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect {
if (tapped && !attacking) {
sb.append("tapped ");
}
sb.append("token that's a copy of target creature");
sb.append("token that's a copy of target ");
} else {
sb.append(number);
sb.append(" ");
if (tapped && !attacking) {
sb.append("tapped ");
}
sb.append("tokens that are copies of target creature");
sb.append("tokens that are copies of target ");
creature
");
}
if (!mode.getTargets().isEmpty()) {
sb.append(mode.getTargets().get(0).getMessage());
} else {
throw new UnsupportedOperationException("Using default rule generation of target effect without having a target object");
}
if (attacking) {
sb.append(" that are");
if (tapped) {