mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Merge origin/master
This commit is contained in:
commit
4bb1b7c29a
1 changed files with 6 additions and 9 deletions
|
@ -62,15 +62,12 @@ class EachOpponentGainsLifeEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
for (UUID opponentId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
game.getOpponents(source.getControllerId()).stream().map((opponentId) -> game.getPlayer(opponentId)).filter((opponent) -> (opponent != null)).forEachOrdered((opponent) -> {
|
||||||
Player opponent = game.getPlayer(opponentId);
|
|
||||||
if (opponent != null) {
|
|
||||||
int amount = (Integer) getValue("damage");
|
int amount = (Integer) getValue("damage");
|
||||||
if (amount > 0) {
|
if (amount > 0) {
|
||||||
opponent.gainLife(amount, game, source);
|
opponent.gainLife(amount, game, source);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
return true;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue