mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* 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:
parent
dbd1981fcb
commit
aaf1f7da7b
3 changed files with 20 additions and 23 deletions
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
Player player = game.getPlayer(getControllerId());
|
||||
return sourceObject != null
|
||||
&& player != null
|
||||
&& player.hasOpponent(sourceObject.getControllerId(), game)
|
||||
&& event.getTargetId().equals(getSourceId());
|
||||
if (event.getTargetId().equals(getSourceId())) {
|
||||
MageObject mageObject = game.getObject(event.getSourceId());
|
||||
Player player = game.getPlayer(getControllerId());
|
||||
return mageObject != null
|
||||
&& mageObject instanceof Spell
|
||||
&& player != null
|
||||
&& 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) {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue