From 8a9b839c0875975472ca7d3fd45cea620e509076 Mon Sep 17 00:00:00 2001 From: moomarc Date: Mon, 18 Feb 2013 07:55:04 +0000 Subject: [PATCH] - Forgot to commit this with Reincarnate --- src/main/java/forge/Card.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index 7a889812a2b..938b979a7e9 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -6888,6 +6888,28 @@ public class Card extends GameEntity implements Comparable { } } } + } else if (property.startsWith("sharesOwnerWith")) { + if (property.equals("sharesOwnerWith")) { + if (!this.getOwner().equals(source.getOwner())) { + return false; + } + } else { + final String restriction = property.split("sharesOwnerWith ")[1]; + if (restriction.equals("Remembered")) { + for (final Object rem : source.getRemembered()) { + if (rem instanceof Card) { + final Card card = (Card) rem; + System.out.println(this + " vs " + card); + System.out.println(this.getOwner().equals(card.getOwner())); + System.out.println(this.getOwner()); + System.out.println(card.getOwner()); + if (!this.getOwner().equals(card.getOwner())) { + return false; + } + } + } + } + } } else if (property.startsWith("SecondSpellCastThisTurn")) { final List list = CardUtil.getThisTurnCast("Card", source); if (list.size() < 2) {