mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
[WHO] Implement Sycorax Commander
This commit is contained in:
parent
b35185872d
commit
dfd3e5e10d
5 changed files with 172 additions and 94 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue