mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -08:00
fix Fanatic of the Harrowing
This commit is contained in:
parent
411100e442
commit
c2797ee24c
1 changed files with 7 additions and 3 deletions
|
|
@ -61,17 +61,21 @@ class FanaticOfTheHarrowingEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
boolean flag = false;
|
||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
if (!player.discard(1, false, false, source, game).isEmpty()
|
||||
&& player.equals(source.getControllerId())) {
|
||||
&& playerId.equals(source.getControllerId())) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
game.processAction();
|
||||
if (flag) {
|
||||
game.getPlayer(source.getControllerId()).drawCards(1, source, game);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
controller.drawCards(1, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue