mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Self-Inflicted Wound - Fixed target handling.
This commit is contained in:
parent
82f57ffb91
commit
7bae8e395d
2 changed files with 5 additions and 5 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue