mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
* Hallowed Burial - Fixed possible NPE.
This commit is contained in:
parent
c40dd7fb4b
commit
be4f3f63d3
1 changed files with 7 additions and 2 deletions
|
@ -38,6 +38,7 @@ import mage.constants.Zone;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -84,8 +85,12 @@ class HallowedBurialEffect extends OneShotEffect<HallowedBurialEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getSourceId(), game)) {
|
||||
creature.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getSourceId(), game)) {
|
||||
creature.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue