mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00: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 mage.abilities.Ability;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.mana.TriggeredManaAbility;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
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.";
|
||||
|
||||
|
@ -104,10 +105,10 @@ class PriceOfGloryAbility extends TriggeredManaAbility<PriceOfGloryAbility> {
|
|||
}
|
||||
}
|
||||
|
||||
class PriceOfGloryEffect extends ManaEffect<PriceOfGloryEffect> {
|
||||
class PriceOfGloryEffect extends OneShotEffect<PriceOfGloryEffect> {
|
||||
|
||||
public PriceOfGloryEffect() {
|
||||
super();
|
||||
super(Outcome.DestroyPermanent);
|
||||
staticText = "if it's not that player's turn, destroy that land.";
|
||||
}
|
||||
|
||||
|
@ -118,10 +119,11 @@ class PriceOfGloryEffect extends ManaEffect<PriceOfGloryEffect> {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability 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);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue