This commit is contained in:
Alex W. Jackson 2022-10-06 22:50:37 -04:00
parent 92cafbd8b1
commit db3262aff6
2 changed files with 8 additions and 12 deletions

View file

@ -83,14 +83,14 @@ class CaptivatingGlanceEffect extends OneShotEffect {
clashResult = ClashEffect.getInstance().apply(game, source);
if (enchantedCreature != null) {
if (clashResult) {
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, false, controller.getId());
effect.setTargetPointer(new FixedTarget(enchantedCreature.getId(), game));
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, controller.getId());
effect.setTargetPointer(new FixedTarget(enchantedCreature, game));
game.addEffect(effect, source);
} else {
Player opponentWhomControllerClashedWith = game.getPlayer(targetPointer.getFirst(game, source));
if (opponentWhomControllerClashedWith != null) {
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, false, opponentWhomControllerClashedWith.getId());
effect.setTargetPointer(new FixedTarget(enchantedCreature.getId(), game));
Object opponent = getValue("clashOpponent");
if (opponent instanceof Player) {
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, ((Player)opponent).getId());
effect.setTargetPointer(new FixedTarget(enchantedCreature, game));
game.addEffect(effect, source);
}
}

View file

@ -139,7 +139,7 @@ public class ClashEffect extends OneShotEffect implements MageSingleton {
game.informPlayer(controller, "You won the clash!");
} else if (cmcController < cmcOpponent) {
message.append(opponent.getLogName()).append(" won the clash");
game.informPlayer(controller, opponent.getLogName() + " won the clash!");
game.informPlayer(controller, opponent.getName() + " won the clash!");
} else {
message.append(" no winner ");
}
@ -177,11 +177,7 @@ public class ClashEffect extends OneShotEffect implements MageSingleton {
));
// set opponent to DoIfClashWonEffect
for (Effect effect : source.getEffects()) {
if (effect instanceof DoIfClashWonEffect) {
effect.setValue("clashOpponent", opponent);
}
}
source.getEffects().setValue("clashOpponent", opponent);
return cmcController > cmcOpponent;
}
}