* Peer into the Abyss - Fixed that the effects were applied to the controller instead of the target player (#6646).

This commit is contained in:
LevelX2 2020-06-29 16:57:59 +02:00
parent c39bcf3d5a
commit 0bc7008130

View file

@ -54,12 +54,12 @@ class PeerIntoTheAbyssEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
if (targetPlayer == null) {
return false;
}
player.drawCards((int) Math.ceil(player.getLibrary().size() / 2.0), source.getSourceId(), game);
player.loseLife((int) Math.ceil(player.getLife() / 2.0), game, false);
targetPlayer.drawCards((int) Math.ceil(targetPlayer.getLibrary().size() / 2.0), source.getSourceId(), game);
targetPlayer.loseLife((int) Math.ceil(targetPlayer.getLife() / 2.0), game, false);
return true;
}
}