This commit is contained in:
BetaSteward 2010-12-19 22:42:32 -05:00
parent b607536435
commit 13648d773e
2 changed files with 7 additions and 12 deletions

View file

@ -64,15 +64,13 @@ public class ReturnToHandTargetEffect extends OneShotEffect<ReturnToHandTargetEf
if (permanent != null) {
return permanent.moveToZone(Zone.HAND, source.getId(), game, false);
}
break;
case GRAVEYARD:
Card card = game.getCard(source.getFirstTarget());
for (Player player: game.getPlayers().values()) {
if (player.getGraveyard().contains(card.getId())) {
player.getHand().add(card);
player.getGraveyard().remove(card);
return true;
}
if (card != null) {
return card.moveToZone(Zone.HAND, source.getId(), game, true);
}
break;
}
return false;
}
@ -82,4 +80,5 @@ public class ReturnToHandTargetEffect extends OneShotEffect<ReturnToHandTargetEf
return "Return target " + source.getTargets().get(0).getTargetName() + " to it's owner's hand";
}
}

View file

@ -575,14 +575,10 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> extends CardImpl
return false;
Permanent attacker = game.getPermanent(attackerId);
//20101001 - 509.1b
for (RestrictionEffect effect: game.getContinuousEffects().getApplicableRestrictionEffects(this, game)) {
if (!effect.canBlock(attacker, game))
for (RestrictionEffect effect: game.getContinuousEffects().getApplicableRestrictionEffects(attacker, game)) {
if (!effect.canBlock(this, game))
return false;
}
// for (EvasionAbility ability: attacker.getAbilities().getEvasionAbilities()) {
// if (!ability.canBlock(this, game))
// return false;
// }
if (attacker.hasProtectionFrom(this))
return false;
return true;