mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Ob Nixilis of the Black Oath - Fixed first ability doing wrongly damage instead of lose life.
This commit is contained in:
parent
d066e7ebf1
commit
d501a38ac4
1 changed files with 6 additions and 3 deletions
|
@ -114,11 +114,14 @@ class ObNixilisOfTheBlackOathEffect1 extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int damage = 0;
|
||||
int loseLife = 0;
|
||||
for (UUID opponentId: game.getOpponents(source.getControllerId())) {
|
||||
damage += game.getPlayer(opponentId).damage(1, source.getSourceId(), game, false, true);
|
||||
Player opponent = game.getPlayer(opponentId);
|
||||
if (opponent != null) {
|
||||
loseLife += opponent.loseLife(1, game);
|
||||
}
|
||||
}
|
||||
controller.gainLife(damage, game);
|
||||
controller.gainLife(loseLife, game);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue