mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
Fixed effects that use opponents' life loss, including Rakdos, Lord of Riots and Neheb the Eternal
This commit is contained in:
parent
38ee5c3d9f
commit
c8d58efa7f
1 changed files with 4 additions and 2 deletions
|
|
@ -34,6 +34,7 @@ import java.util.UUID;
|
|||
import mage.constants.WatcherScope;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
/*
|
||||
|
|
@ -81,8 +82,9 @@ public class PlayerLostLifeWatcher extends Watcher {
|
|||
public int getAllOppLifeLost(UUID playerId, Game game) {
|
||||
int amount = 0;
|
||||
for (UUID opponentId : this.amountOfLifeLostThisTurn.keySet()) {
|
||||
if (game.getOpponents(playerId).contains(opponentId)) {
|
||||
amount += this.amountOfLifeLostThisTurn.get(playerId);
|
||||
Player opponent = game.getPlayer(opponentId);
|
||||
if (opponent != null && opponent.hasOpponent(playerId, game)) {
|
||||
amount += this.amountOfLifeLostThisTurn.getOrDefault(opponentId, 0);
|
||||
}
|
||||
}
|
||||
return amount;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue