mirror of
https://github.com/correl/mage.git
synced 2025-03-16 01:06:34 -09:00
Update PriceOfGlory.java
This commit is contained in:
parent
2363931250
commit
9f90a8a2a0
1 changed files with 9 additions and 7 deletions
|
@ -29,10 +29,11 @@ package mage.sets.odyssey;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.common.ManaEffect;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.mana.TriggeredManaAbility;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -66,7 +67,7 @@ public class PriceOfGlory extends CardImpl<PriceOfGlory> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PriceOfGloryAbility extends TriggeredManaAbility<PriceOfGloryAbility> {
|
class PriceOfGloryAbility extends TriggeredAbilityImpl<PriceOfGloryAbility> {
|
||||||
|
|
||||||
private static final String staticText = "Whenever a player taps a land for mana, if it's not that player's turn, destroy that land.";
|
private static final String staticText = "Whenever a player taps a land for mana, if it's not that player's turn, destroy that land.";
|
||||||
|
|
||||||
|
@ -104,10 +105,10 @@ class PriceOfGloryAbility extends TriggeredManaAbility<PriceOfGloryAbility> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PriceOfGloryEffect extends ManaEffect<PriceOfGloryEffect> {
|
class PriceOfGloryEffect extends OneShotEffect<PriceOfGloryEffect> {
|
||||||
|
|
||||||
public PriceOfGloryEffect() {
|
public PriceOfGloryEffect() {
|
||||||
super();
|
super(Outcome.DestroyPermanent);
|
||||||
staticText = "if it's not that player's turn, destroy that land.";
|
staticText = "if it's not that player's turn, destroy that land.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,10 +119,11 @@ class PriceOfGloryEffect extends ManaEffect<PriceOfGloryEffect> {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source));
|
Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source));
|
||||||
if (!land.getControllerId().equals(game.getActivePlayerId())) {
|
if (land != null && !land.getControllerId().equals(game.getActivePlayerId())) {
|
||||||
land.destroy(source.getSourceId(), game, false);
|
land.destroy(source.getSourceId(), game, false);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue