mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
*Added Parallel Lives.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user