mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 20:59:14 -08:00
Crown of Doom bug fix
This commit is contained in:
parent
270ffcb88a
commit
5442a92a2b
1 changed files with 2 additions and 2 deletions
|
|
@ -63,7 +63,7 @@ public class CrownOfDoom extends CardImpl {
|
||||||
private static final FilterPlayer filter = new FilterPlayer("player other than Crown of Doom's owner");
|
private static final FilterPlayer filter = new FilterPlayer("player other than Crown of Doom's owner");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new PlayerPredicate(TargetController.NOT_YOU));
|
filter.add(new PlayerPredicate(TargetController.OPPONENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CrownOfDoom(UUID ownerId) {
|
public CrownOfDoom(UUID ownerId) {
|
||||||
|
|
@ -111,7 +111,7 @@ class CrownOfDoomEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
Player newController = game.getPlayer(getTargetPointer().getFirst(game, source));
|
Player newController = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
if (controller != null && newController != null) {
|
if (controller != null && newController != null && controller.getId() != newController.getId()) {
|
||||||
ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, newController.getId());
|
ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, newController.getId());
|
||||||
effect.setTargetPointer(new FixedTarget(source.getSourceId()));
|
effect.setTargetPointer(new FixedTarget(source.getSourceId()));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue