mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 04:09:54 -08:00
fixed The Wanderer preventing combat damage to its controller (fixes #5804)
This commit is contained in:
parent
4460c1aff7
commit
2258e583bd
1 changed files with 3 additions and 12 deletions
|
|
@ -20,15 +20,12 @@ import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.effects.common.PreventDamageToControllerEffect;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class TheWanderer extends CardImpl {
|
public final class TheWanderer extends CardImpl {
|
||||||
|
|
||||||
private static final String rule = "Prevent all noncombat damage that "
|
|
||||||
+ "would be dealt to you and other permanents you control.";
|
|
||||||
private static final FilterPermanent filter
|
private static final FilterPermanent filter
|
||||||
= new FilterControlledPermanent("other permanents you control");
|
= new FilterControlledPermanent("other permanents you control");
|
||||||
private static final FilterPermanent filter2
|
private static final FilterPermanent filter2
|
||||||
|
|
@ -46,15 +43,9 @@ public final class TheWanderer extends CardImpl {
|
||||||
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5));
|
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5));
|
||||||
|
|
||||||
// Prevent all noncombat damage that would be dealt to you and other permanents you control.
|
// Prevent all noncombat damage that would be dealt to you and other permanents you control.
|
||||||
this.addAbility(new SimpleStaticAbility(
|
this.addAbility(new SimpleStaticAbility(new PreventAllNonCombatDamageToAllEffect(
|
||||||
new PreventDamageToControllerEffect(
|
Duration.WhileOnBattlefield, filter, true
|
||||||
Duration.WhileOnBattlefield, true, false,
|
)));
|
||||||
Integer.MAX_VALUE
|
|
||||||
).setText(rule)));
|
|
||||||
this.addAbility(new SimpleStaticAbility(
|
|
||||||
new PreventAllNonCombatDamageToAllEffect(
|
|
||||||
Duration.WhileOnBattlefield, filter, true
|
|
||||||
).setText("")));
|
|
||||||
|
|
||||||
// -2: Exile target creature with power 4 or greater.
|
// -2: Exile target creature with power 4 or greater.
|
||||||
Ability ability = new LoyaltyAbility(new ExileTargetEffect(), -2);
|
Ability ability = new LoyaltyAbility(new ExileTargetEffect(), -2);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue