foul-magics/Mage/src/main/java/mage/abilities/common/ActivateOnlyByOpponentActivatedAbility.java
Susucre f75b1c9f0a
Code cleanup: protect all copy constructors (#10750)
* apply regex to change public copy constructors to protected
* cleanup code using now protected constructors
* fix manaBuilder weird casting of Mana into ConditionalMana
2023-08-04 19:34:58 -04:00

33 lines
936 B
Java

package mage.abilities.common;
import mage.abilities.ActivatedAbilityImpl;
import mage.abilities.costs.Cost;
import mage.abilities.effects.Effect;
import mage.constants.Zone;
import mage.constants.TargetController;
/**
* @author jeffwadsworth
*/
public class ActivateOnlyByOpponentActivatedAbility extends ActivatedAbilityImpl {
public ActivateOnlyByOpponentActivatedAbility(Zone zone, Effect effect, Cost cost) {
super(zone, effect, cost);
mayActivate = TargetController.OPPONENT;
}
protected ActivateOnlyByOpponentActivatedAbility(final ActivateOnlyByOpponentActivatedAbility ability) {
super(ability);
}
@Override
public ActivateOnlyByOpponentActivatedAbility copy() {
return new ActivateOnlyByOpponentActivatedAbility(this);
}
@Override
public String getRule() {
return super.getRule() + " Only your opponents may activate this ability.";
}
}