mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -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) {
|
public boolean apply(Game game, Ability source) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(playerId);
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!player.discard(1, false, false, source, game).isEmpty()
|
if (!player.discard(1, false, false, source, game).isEmpty()
|
||||||
&& player.equals(source.getControllerId())) {
|
&& playerId.equals(source.getControllerId())) {
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
game.processAction();
|
||||||
if (flag) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue