foul-magics/Mage/src/main/java/mage/abilities/keyword/BountyAbility.java
Evan Kranzler ca80806400
Reworking triggered ability text generation to allow for ability words and flavor words to be added more easily (#8010)
* refactor all instances of getRule in triggered abilities using new getTriggerPrefix method

* updated triggered ability rules generation

* renamed method

* fixed a test failure

* some more refactoring

* simplified some instances of ability word usage
2021-07-15 07:46:38 -04:00

48 lines
1.3 KiB
Java

package mage.abilities.keyword;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.constants.TargetController;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
/**
*
* @author Styxo
*/
public class BountyAbility extends DiesCreatureTriggeredAbility {
private static final FilterCreaturePermanent bountyCounterFilter = new FilterCreaturePermanent("creature an opponent controls with a bounty counter on it");
static {
bountyCounterFilter.add(TargetController.OPPONENT.getControllerPredicate());
bountyCounterFilter.add(CounterType.BOUNTY.getPredicate());
}
public BountyAbility(Effect effect) {
super(effect, false, bountyCounterFilter);
}
public BountyAbility(Effect effect, boolean optional) {
super(effect, optional, bountyCounterFilter);
}
public BountyAbility(Effect effect, boolean optional, boolean setTargetPointer) {
super(effect, optional, bountyCounterFilter, setTargetPointer);
}
public BountyAbility(final BountyAbility ability) {
super(ability);
}
@Override
public BountyAbility copy() {
return new BountyAbility(this);
}
@Override
public String getTriggerPhrase() {
return "<i>Bounty</i> &mdash; " ;
}
}