mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
refactor: remove redundant class
This commit is contained in:
parent
ee9bb3b892
commit
3aeb5165b7
3 changed files with 10 additions and 53 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue