[MKM] Implement Person of Interest

This commit is contained in:
theelk801 2024-01-25 20:57:13 -05:00
parent 291f88b1f6
commit 1f3d184ead
3 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,36 @@
package mage.abilities.effects.common;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.game.Game;
import java.util.Optional;
/**
* @author TheElk801
*/
public class SuspectSourceEffect extends OneShotEffect {
public SuspectSourceEffect() {
super(Outcome.Benefit);
staticText = "suspect it";
}
private SuspectSourceEffect(final SuspectSourceEffect effect) {
super(effect);
}
@Override
public SuspectSourceEffect copy() {
return new SuspectSourceEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Optional.ofNullable(source.getSourcePermanentIfItStillExists(game))
.ifPresent(permanent -> permanent.setSuspected(true, game, source));
return true;
}
}