*Added Parallel Lives.

This commit is contained in:
Hellfish
2011-10-17 16:32:03 +00:00
parent 0c6ed2e819
commit 19cb646e47
5 changed files with 23 additions and 2 deletions

View File

@@ -266,6 +266,17 @@ public abstract class AllZoneUtil {
int doublingSeasons = player.getCardsIn(Zone.Battlefield, "Doubling Season").size();
return (int) Math.pow(2, doublingSeasons); // pow(a,0) = 1; pow(a,1) = a ... no worries about size = 0
}
/**
* <p>getTokenDoublersMagnitude.</p>
*
* @param player the {@link forge.Player} player to determine if is affected by Doubling Season
* @return a int.
*/
public static int getTokenDoublersMagnitude(final Player player) {
int tokenDoublers = player.getCardsIn(Zone.Battlefield, "Parallel Lives").size() + player.getCardsIn(Zone.Battlefield,"Doubling Season").size();
return (int) Math.pow(2, tokenDoublers); // pow(a,0) = 1; pow(a,1) = a ... no worries about size = 0
}
/**
* gets a list of all opponents of a given player.

View File

@@ -311,7 +311,7 @@ public final class AbilityFactory_Copy {
if (tgt == null || CardFactoryUtil.canTarget(hostCard, c)) {
//start copied Kiki code
int multiplier = AllZoneUtil.getDoublingSeasonMagnitude(hostCard.getController());
int multiplier = AllZoneUtil.getTokenDoublersMagnitude(hostCard.getController());
multiplier *= numCopies;
Card[] crds = new Card[multiplier];

View File

@@ -3920,7 +3920,7 @@ public class CardFactoryUtil {
}
}
int multiplier = AllZoneUtil.getDoublingSeasonMagnitude(controller);
int multiplier = AllZoneUtil.getTokenDoublersMagnitude(controller);
// TODO - does this need to set
// PlayerZone_ComesIntoPlay.SimultaneousEntry like Rite of Replication
// does?