* Bronzehide Lion - Fixed that activated ability of enchanted form applied Indestructibility while on battlefield if activated instead of end of the turn.

* Tectonic Giant - Fixed that it also triggerd on activated abilities instead only for spells. 
(fixes #6397)
This commit is contained in:
LevelX2 2020-06-14 08:46:25 +02:00
parent dbd1981fcb
commit aaf1f7da7b
3 changed files with 20 additions and 23 deletions

View file

@ -4,7 +4,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
@ -109,7 +108,7 @@ class BronzehideLionContinuousEffect extends ContinuousEffectImpl {
private final int zoneChangeCounter;
private final Ability activatedAbility = new SimpleActivatedAbility(new GainAbilityAttachedEffect(
IndestructibleAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield
IndestructibleAbility.getInstance(), AttachmentType.AURA, Duration.EndOfTurn
), new ManaCostsImpl("{G}{W}"));
BronzehideLionContinuousEffect(int zoneChangeCounter) {

View file

@ -1,6 +1,8 @@
package mage.cards.t;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.TriggeredAbilityImpl;
@ -10,19 +12,16 @@ import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.cards.*;
import mage.constants.*;
import static mage.constants.Outcome.Benefit;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.stack.StackObject;
import mage.game.stack.Spell;
import mage.players.Player;
import mage.target.TargetCard;
import mage.target.common.TargetCardInExile;
import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
import static mage.constants.Outcome.Benefit;
/**
* @author TheElk801
*/
@ -75,12 +74,14 @@ class TectonicGiantTriggeredAbility extends TriggeredAbilityImpl {
case DECLARED_ATTACKERS:
return game.getCombat().getAttackers().contains(this.getSourceId());
case TARGETED:
StackObject sourceObject = game.getStack().getStackObject(event.getSourceId());
if (event.getTargetId().equals(getSourceId())) {
MageObject mageObject = game.getObject(event.getSourceId());
Player player = game.getPlayer(getControllerId());
return sourceObject != null
return mageObject != null
&& mageObject instanceof Spell
&& player != null
&& player.hasOpponent(sourceObject.getControllerId(), game)
&& event.getTargetId().equals(getSourceId());
&& player.hasOpponent(((Spell) mageObject).getControllerId(), game);
}
}
return false;
}
@ -100,8 +101,8 @@ class TectonicGiantEffect extends OneShotEffect {
TectonicGiantEffect() {
super(Benefit);
staticText = "exile the top two cards of your library. Choose one of them. " +
"Until the end of your next turn, you may play that card";
staticText = "exile the top two cards of your library. Choose one of them. "
+ "Until the end of your next turn, you may play that card";
}
private TectonicGiantEffect(final TectonicGiantEffect effect) {

View file

@ -1,5 +1,8 @@
package mage;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
import mage.abilities.Abilities;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCost;
@ -15,12 +18,6 @@ import mage.game.Game;
import mage.game.events.ZoneChangeEvent;
import mage.util.SubTypeList;
import java.io.Serializable;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
public interface MageObject extends MageItem, Serializable {
String getName();
@ -42,8 +39,8 @@ public interface MageObject extends MageItem, Serializable {
Set<SuperType> getSuperType();
/**
* For cards: return basic abilities (without dynamic added)
* For permanents: return all abilities (dynamic ability inserts into permanent)
* For cards: return basic abilities (without dynamic added) For permanents:
* return all abilities (dynamic ability inserts into permanent)
*/
Abilities<Ability> getAbilities();