remove superfluous usage of isPhasedOutIndirectly

This commit is contained in:
xenohedron 2024-06-02 03:49:07 -04:00
parent 502ca34d14
commit 7a76a3b005
3 changed files with 3 additions and 11 deletions

View file

@ -36,9 +36,7 @@ public class DestroySourceEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
if (permanent != null
&& permanent.isPhasedIn()
&& !permanent.isPhasedOutIndirectly()) {
if (permanent != null && permanent.isPhasedIn()) {
permanent.destroy(source, game, noRegen);
return true;
}

View file

@ -6,10 +6,6 @@ import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.Target;
import mage.target.targetpointer.FirstTargetPointer;
import mage.target.targetpointer.SecondTargetPointer;
import mage.util.CardUtil;
import java.util.UUID;
@ -53,9 +49,7 @@ public class DestroyTargetEffect extends OneShotEffect {
int affectedTargets = 0;
for (UUID permanentId : getTargetPointer().getTargets(game, source)) {
Permanent permanent = game.getPermanent(permanentId);
if (permanent != null
&& permanent.isPhasedIn()
&& !permanent.isPhasedOutIndirectly()) {
if (permanent != null && permanent.isPhasedIn()) {
permanent.destroy(source, game, noRegen);
affectedTargets++;
}