mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
- Fixed #8376 and #8285. There is still a pre-existing issue with the attacking trigger on the Fractal Harness, though. It runs through the apply twice so the counters are four times as many instead of two.
This commit is contained in:
parent
bce88bd399
commit
19eb9f7122
2 changed files with 14 additions and 8 deletions
|
|
@ -56,8 +56,8 @@ class FractalHarnessTokenEffect extends OneShotEffect {
|
||||||
|
|
||||||
FractalHarnessTokenEffect() {
|
FractalHarnessTokenEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
staticText = "create a 0/0 green and blue Fractal creature token. " +
|
staticText = "create a 0/0 green and blue Fractal creature token. "
|
||||||
"Put X +1/+1 counters on it and attach {this} to it";
|
+ "Put X +1/+1 counters on it and attach {this} to it";
|
||||||
}
|
}
|
||||||
|
|
||||||
private FractalHarnessTokenEffect(final FractalHarnessTokenEffect effect) {
|
private FractalHarnessTokenEffect(final FractalHarnessTokenEffect effect) {
|
||||||
|
|
@ -80,7 +80,8 @@ class FractalHarnessTokenEffect extends OneShotEffect {
|
||||||
if (permanent == null) {
|
if (permanent == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (flag && permanent.addAttachment(tokenId, source, game)) {
|
if (flag
|
||||||
|
&& permanent.addAttachment(source.getSourceId(), source, game)) {
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
permanent.addCounters(CounterType.P1P1.createInstance(xValue), source.getControllerId(), source, game);
|
permanent.addCounters(CounterType.P1P1.createInstance(xValue), source.getControllerId(), source, game);
|
||||||
|
|
@ -108,8 +109,13 @@ class FractalHarnessDoubleEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = (Permanent) getValue("attachedPermanent");
|
Permanent permanent = (Permanent) getValue("attachedPermanent");
|
||||||
return permanent != null && permanent.addCounters(CounterType.P1P1.createInstance(
|
if (permanent == null) {
|
||||||
permanent.getCounters(game).getCount(CounterType.P1P1)
|
return false;
|
||||||
), source.getControllerId(), source, game);
|
}
|
||||||
|
// BUG : changed this to a integer due to the trigger firing twice
|
||||||
|
final int addedCounters = permanent.getCounters(game).getCount(CounterType.P1P1);
|
||||||
|
// BUG : this oneShotEffect is being run twice for some reason, so the number of counters is four times as many
|
||||||
|
return permanent.addCounters(CounterType.P1P1.createInstance(addedCounters),
|
||||||
|
source.getControllerId(), source, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ import mage.game.permanent.token.WhiteBlackSpiritToken;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.filter.common.FilterCreatureCard;
|
||||||
|
|
||||||
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
|
@ -41,7 +41,7 @@ public final class TeysaEnvoyOfGhosts extends CardImpl {
|
||||||
this.addAbility(VigilanceAbility.getInstance());
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
// protection from creatures
|
// protection from creatures
|
||||||
this.addAbility(new ProtectionAbility(FILTER_PERMANENT_CREATURES));
|
this.addAbility(new ProtectionAbility(new FilterCreatureCard("creatures")));
|
||||||
|
|
||||||
// Whenever a creature deals combat damage to you, destroy that creature. Create a 1/1 white and black Spirit creature token with flying.
|
// Whenever a creature deals combat damage to you, destroy that creature. Create a 1/1 white and black Spirit creature token with flying.
|
||||||
this.addAbility(new TeysaEnvoyOfGhostsTriggeredAbility());
|
this.addAbility(new TeysaEnvoyOfGhostsTriggeredAbility());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue