[WHO] Implement Sycorax Commander

This commit is contained in:
theelk801 2025-04-23 14:20:46 -04:00
parent b35185872d
commit dfd3e5e10d
5 changed files with 172 additions and 94 deletions

View file

@ -0,0 +1,45 @@
package mage.abilities.effects.common;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.choices.FaceVillainousChoice;
import mage.constants.Outcome;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public class FaceVillainousChoiceOpponentsEffect extends OneShotEffect {
private final FaceVillainousChoice choice;
public FaceVillainousChoiceOpponentsEffect(FaceVillainousChoice choice) {
super(Outcome.Benefit);
this.choice = choice;
staticText = "each opponent " + choice.generateRule();
}
private FaceVillainousChoiceOpponentsEffect(final FaceVillainousChoiceOpponentsEffect effect) {
super(effect);
this.choice = effect.choice;
}
@Override
public FaceVillainousChoiceOpponentsEffect copy() {
return new FaceVillainousChoiceOpponentsEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for (UUID playerId : game.getOpponents(source.getControllerId())) {
Player player = game.getPlayer(playerId);
if (player != null) {
choice.faceChoice(player, game, source);
}
}
return true;
}
}