Curfew - Fix targeting/protection issue

This commit is contained in:
Jonathan Skeate 2017-12-24 13:32:52 -05:00
parent 9c0f1c8db0
commit 1cc434c6bd
No known key found for this signature in database
GPG key ID: 706886CF92C22357

View file

@ -79,8 +79,9 @@ class CurfewEffect extends OneShotEffect{
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent();
List<Permanent> liste = game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), playerId, game);
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(1, 1, filter, true);
List<Permanent> liste = game.getBattlefield().getActivePermanents(filter, playerId, game);
if(!liste.isEmpty()){
player.choose(Outcome.ReturnToHand, target, source.getSourceId(), game);