mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
* Peer into the Abyss - Fixed that the effects were applied to the controller instead of the target player (#6646).
This commit is contained in:
parent
c39bcf3d5a
commit
0bc7008130
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue