mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
[ZNC] fixed Trove Warden not bringing back exiled cards (#7085)
This commit is contained in:
parent
6fda64b4e9
commit
49346028ca
2 changed files with 6 additions and 4 deletions
|
@ -2,6 +2,7 @@ package mage.cards.t;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.common.LandfallAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
|
@ -14,12 +15,12 @@ import mage.filter.common.FilterPermanentCard;
|
|||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
@ -82,11 +83,12 @@ class TroveWardenEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
Permanent permanent = (Permanent) getValue("permanentLeftBattlefield");
|
||||
if (controller == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(
|
||||
game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()
|
||||
game, permanent.getId(), permanent.getZoneChangeCounter(game)
|
||||
));
|
||||
if (exileZone == null) {
|
||||
return true;
|
||||
|
|
|
@ -20,7 +20,7 @@ public final class Twincast extends CardImpl {
|
|||
|
||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||
this.getSpellAbility().addEffect(new CopyTargetSpellEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
}
|
||||
|
||||
public Twincast(final Twincast card) {
|
||||
|
|
Loading…
Reference in a new issue