forked from External/mage
[LGN] fixed Berserk Murlodont not functioning correctly (fixes #7801)
This commit is contained in:
parent
ff64cb0cec
commit
6bb474a6d0
11 changed files with 88 additions and 63 deletions
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
@ -11,16 +11,15 @@ import mage.game.permanent.Permanent;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class BecomesBlockedAllTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private FilterCreaturePermanent filter;
|
||||
private boolean setTargetPointer;
|
||||
private final FilterCreaturePermanent filter;
|
||||
private final boolean setTargetPointer;
|
||||
|
||||
public BecomesBlockedAllTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(effect, optional, new FilterCreaturePermanent("a creature"), false);
|
||||
this(effect, optional, StaticFilters.FILTER_PERMANENT_CREATURE_A, false);
|
||||
}
|
||||
|
||||
public BecomesBlockedAllTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter, boolean setTargetPointer) {
|
||||
|
|
@ -45,7 +44,7 @@ public class BecomesBlockedAllTriggeredAbility extends TriggeredAbilityImpl {
|
|||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (filter.match(permanent, getSourceId(), getControllerId(), game)) {
|
||||
if (setTargetPointer) {
|
||||
this.getEffects().setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
this.getEffects().setTargetPointer(new FixedTarget(event.getTargetId(), game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue