mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
fix Faller's Faithful
This commit is contained in:
parent
b8a65a31f4
commit
003fe945a2
1 changed files with 8 additions and 9 deletions
|
|
@ -10,12 +10,11 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Controllable;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -70,14 +69,14 @@ class FallersFaithfulEffect extends OneShotEffect {
|
||||||
if (permanent == null) {
|
if (permanent == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
boolean flag = permanent.getDealtDamageByThisTurn().isEmpty();
|
boolean notDamagedThisTurn = permanent.getDealtDamageByThisTurn().isEmpty();
|
||||||
permanent.destroy(source, game);
|
permanent.destroy(source, game);
|
||||||
game.processAction();
|
if (notDamagedThisTurn) {
|
||||||
if (!flag) {
|
game.processAction();
|
||||||
Optional.ofNullable(permanent)
|
Player player = game.getPlayer(permanent.getControllerId());
|
||||||
.map(Controllable::getControllerId)
|
if (player != null) {
|
||||||
.map(game::getPlayer)
|
player.drawCards(2, source, game);
|
||||||
.ifPresent(player -> player.drawCards(2, source, game));
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue