mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
fixed test failures (fixes #8016)
This commit is contained in:
parent
c08c4bbb36
commit
d3b5c51428
4 changed files with 10 additions and 7 deletions
|
@ -53,7 +53,7 @@ class SpareDaggerEffect extends GainAbilityWithAttachmentEffect {
|
|||
SpareDaggerEffect() {
|
||||
super("and has \"Whenever this creature attacks, you may sacrifice {this}. " +
|
||||
"When you do, this creature deals 1 damage to any target.\"",
|
||||
(Effect) null, null, new SacrificeAttachmentCost(), null);
|
||||
(Effect) null, null, new SacrificeAttachmentCost());
|
||||
}
|
||||
|
||||
private SpareDaggerEffect(final SpareDaggerEffect effect) {
|
||||
|
|
|
@ -51,7 +51,7 @@ class TrickstersTalismanEffect extends GainAbilityWithAttachmentEffect {
|
|||
TrickstersTalismanEffect() {
|
||||
super("and has \"Whenever this creature deals combat damage to a player, " +
|
||||
"you may sacrifice {this}. If you do, create a token that's a copy of this creature.\"",
|
||||
(Effect) null, null, new SacrificeAttachmentCost(), null);
|
||||
(Effect) null, null, new SacrificeAttachmentCost());
|
||||
}
|
||||
|
||||
private TrickstersTalismanEffect(final TrickstersTalismanEffect effect) {
|
||||
|
|
|
@ -134,9 +134,6 @@ public class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
return clauseText + ", ";
|
||||
}
|
||||
System.out.println("==================");
|
||||
System.out.println(clauseText);
|
||||
System.out.println("==================");
|
||||
return "if " + clauseText + ", ";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import mage.target.Target;
|
|||
import mage.target.Targets;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
@ -39,8 +39,14 @@ public class GainAbilityWithAttachmentEffect extends ContinuousEffectImpl {
|
|||
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||
this.staticText = rule;
|
||||
this.effects.addAll(effects);
|
||||
this.effects.removeIf(Objects::isNull);
|
||||
this.targets.addAll(targets);
|
||||
this.costs.addAll(Arrays.asList(costs));
|
||||
this.targets.removeIf(Objects::isNull);
|
||||
for (Cost cost : costs) {
|
||||
if (cost != null) {
|
||||
this.costs.add(cost);
|
||||
}
|
||||
}
|
||||
this.useAttachedCost = attachedCost;
|
||||
this.generateGainAbilityDependencies(makeAbility(null, null), null);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue