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) { if (permanent != null) {
return permanent.moveToZone(Zone.HAND, source.getId(), game, false); return permanent.moveToZone(Zone.HAND, source.getId(), game, false);
} }
break;
case GRAVEYARD: case GRAVEYARD:
Card card = game.getCard(source.getFirstTarget()); Card card = game.getCard(source.getFirstTarget());
for (Player player: game.getPlayers().values()) { if (card != null) {
if (player.getGraveyard().contains(card.getId())) { return card.moveToZone(Zone.HAND, source.getId(), game, true);
player.getHand().add(card);
player.getGraveyard().remove(card);
return true;
}
} }
break;
} }
return false; 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"; 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; return false;
Permanent attacker = game.getPermanent(attackerId); Permanent attacker = game.getPermanent(attackerId);
//20101001 - 509.1b //20101001 - 509.1b
for (RestrictionEffect effect: game.getContinuousEffects().getApplicableRestrictionEffects(this, game)) { for (RestrictionEffect effect: game.getContinuousEffects().getApplicableRestrictionEffects(attacker, game)) {
if (!effect.canBlock(attacker, game)) if (!effect.canBlock(this, game))
return false; return false;
} }
// for (EvasionAbility ability: attacker.getAbilities().getEvasionAbilities()) {
// if (!ability.canBlock(this, game))
// return false;
// }
if (attacker.hasProtectionFrom(this)) if (attacker.hasProtectionFrom(this))
return false; return false;
return true; return true;