mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Modified ExaltedAbility to use fixed target
This commit is contained in:
parent
c366f3ed61
commit
3ff462e20b
3 changed files with 3 additions and 34 deletions
|
|
@ -41,7 +41,7 @@ import mage.game.Game;
|
|||
* Affinity for artifacts
|
||||
*/
|
||||
public class AffinityForArtifactsAbility extends SimpleStaticAbility implements AdjustingSourceCosts {
|
||||
private static FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
|
||||
static {
|
||||
filter.getCardType().add(Constants.CardType.ARTIFACT);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -60,9 +60,7 @@ public class ExaltedAbility extends TriggeredAbilityImpl<ExaltedAbility> {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.DECLARED_ATTACKERS && game.getActivePlayerId().equals(this.controllerId) ) {
|
||||
if (game.getCombat().attacksAlone()) {
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent();
|
||||
this.addTarget(target);
|
||||
this.getTargets().get(0).add(game.getCombat().getAttackers().get(0),game);
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(game.getCombat().getAttackers().get(0)));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue