* Self-Inflicted Wound - Fixed target handling.

This commit is contained in:
LevelX2 2015-04-04 09:00:41 +02:00
parent 82f57ffb91
commit 7bae8e395d
2 changed files with 5 additions and 5 deletions

View file

@ -100,9 +100,9 @@ class SelfInflictedWoundEffect extends OneShotEffect {
filter.add(new CardTypePredicate(CardType.CREATURE));
filter.add(new ControllerPredicate(TargetController.YOU));
filter.add(Predicates.or(new ColorPredicate(ObjectColor.GREEN), new ColorPredicate(ObjectColor.WHITE)));
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false);
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true);
if (target.canChoose(targetOpponent.getId(), game)) {
if (target.canChoose(source.getSourceId(), targetOpponent.getId(), game)) {
targetOpponent.chooseTarget(Outcome.Sacrifice, target, source, game);
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null) {

View file

@ -119,10 +119,10 @@ public class TargetPermanent extends TargetObject {
*
* Takes into account notTarget parameter, in case it's true doesn't check for protection, shroud etc.
*
* @param sourceId - the target event source
* @param sourceControllerId - controller of the target event source
* @param sourceId the target event source
* @param sourceControllerId controller of the target event source
* @param game
* @return - true if enough valid {@link Permanent} exist
* @return true if enough valid {@link Permanent} exist
*/
@Override
public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) {