mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
- Fixed Rivals' Duel
This commit is contained in:
parent
a7acaefb4a
commit
ac4e51ce0d
2 changed files with 12 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue