refactor: remove redundant class

This commit is contained in:
xenohedron 2024-05-16 15:52:01 -04:00
parent ee9bb3b892
commit 3aeb5165b7
3 changed files with 10 additions and 53 deletions

View file

@ -1,39 +0,0 @@
package mage.abilities.effects.common.combat;
import mage.abilities.Ability;
import mage.abilities.effects.RestrictionEffect;
import mage.constants.Duration;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
* The source of this effect can't attack any opponent
*
* @author BetaSteward_at_googlemail.com
*/
public class CantAttackAnyPlayerSourceEffect extends RestrictionEffect {
public CantAttackAnyPlayerSourceEffect(Duration duration) {
super(duration);
}
protected CantAttackAnyPlayerSourceEffect(final CantAttackAnyPlayerSourceEffect effect) {
super(effect);
}
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
return permanent.getId().equals(source.getSourceId());
}
@Override
public boolean canAttack(Game game, boolean canUseChooseDialogs) {
return false;
}
@Override
public CantAttackAnyPlayerSourceEffect copy() {
return new CantAttackAnyPlayerSourceEffect(this);
}
}