- Fixed Rivals' Duel

This commit is contained in:
Jeff 2019-02-13 10:19:07 -06:00
parent a7acaefb4a
commit ac4e51ce0d
2 changed files with 12 additions and 4 deletions

View file

@ -1,4 +1,3 @@
package mage.cards.r;
import java.util.UUID;
@ -51,8 +50,16 @@ class RivalsDuelFightTargetsEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Permanent creature1 = game.getPermanent(source.getFirstTarget());
Permanent creature2 = game.getPermanent(source.getTargets().get(0).getTargets().get(1));
Permanent creature1 = null;
Permanent creature2 = null;
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
if (creature1 == null) {
creature1 = game.getPermanent(targetId);
} else {
creature2 = game.getPermanent(targetId);
}
}
// 20110930 - 701.10
if (creature1 != null
&& creature2 != null) {

View file

@ -35,7 +35,8 @@ public class TargetCreaturePermanentWithDifferentTypes extends TargetCreaturePer
for (Object object : getTargets()) {
UUID targetId = (UUID) object;
Permanent selectedCreature = game.getPermanent(targetId);
if (!creature.getId().equals(selectedCreature.getId())) {
if (selectedCreature != null
&& !creature.getId().equals(selectedCreature.getId())) {
if (creature.shareSubtypes(selectedCreature, game)) {
return false;
}