a Card that bounces back and forth via a self-trigger of AF_GainControl doesn't need to say it's controlling itself 20 times...

This commit is contained in:
slapshot5
2011-10-05 07:09:42 +00:00
parent e9b05086ff
commit 7babcc1ab4

View File

@@ -335,6 +335,7 @@ public class AbilityFactory_GainControl {
*/ */
private void gainControlResolve(final SpellAbility sa) { private void gainControlResolve(final SpellAbility sa) {
ArrayList<Card> tgtCards; ArrayList<Card> tgtCards;
boolean self = params.containsKey("Defined") && params.get("Defined").equals("Self");
Target tgt = af.getAbTgt(); Target tgt = af.getAbTgt();
if (tgt != null) { if (tgt != null) {
@@ -356,7 +357,9 @@ public class AbilityFactory_GainControl {
final Player originalController = tgtC.getController(); final Player originalController = tgtC.getController();
movedCards[j] = tgtC; movedCards[j] = tgtC;
hostCard.addGainControlTarget(tgtC); if (!self) {
hostCard.addGainControlTarget(tgtC);
}
if (AllZoneUtil.isCardInPlay(tgtC) && CardFactoryUtil.canTarget(hostCard, tgtC)) { if (AllZoneUtil.isCardInPlay(tgtC) && CardFactoryUtil.canTarget(hostCard, tgtC)) {