*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

1
.gitattributes vendored
View File

@@ -5730,6 +5730,7 @@ res/cardsfolder/p/parallax_inhibitor.txt svneol=native#text/plain
res/cardsfolder/p/parallax_tide.txt svneol=native#text/plain res/cardsfolder/p/parallax_tide.txt svneol=native#text/plain
res/cardsfolder/p/parallax_wave.txt svneol=native#text/plain res/cardsfolder/p/parallax_wave.txt svneol=native#text/plain
res/cardsfolder/p/parallel_evolution.txt svneol=native#text/plain res/cardsfolder/p/parallel_evolution.txt svneol=native#text/plain
res/cardsfolder/p/parallel_lives.txt -text
res/cardsfolder/p/paralyzing_grasp.txt svneol=native#text/plain res/cardsfolder/p/paralyzing_grasp.txt svneol=native#text/plain
res/cardsfolder/p/parapet_watchers.txt svneol=native#text/plain res/cardsfolder/p/parapet_watchers.txt svneol=native#text/plain
res/cardsfolder/p/paraselene.txt -text res/cardsfolder/p/paraselene.txt -text

View File

@@ -0,0 +1,9 @@
Name:Parallel Lives
ManaCost:3 G
Types:Enchantment
Text:If an effect would put one or more tokens onto the battlefield under your control, it puts twice that many of those tokens onto the battlefield instead.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/parallel_lives.jpg
SetInfo:ISD|Rare|http://magiccards.info/scans/en/isd/199.jpg
Oracle:If an effect would put one or more tokens onto the battlefield under your control, it puts twice that many of those tokens onto the battlefield instead.
End

View File

@@ -266,6 +266,17 @@ public abstract class AllZoneUtil {
int doublingSeasons = player.getCardsIn(Zone.Battlefield, "Doubling Season").size(); 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 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. * 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)) { if (tgt == null || CardFactoryUtil.canTarget(hostCard, c)) {
//start copied Kiki code //start copied Kiki code
int multiplier = AllZoneUtil.getDoublingSeasonMagnitude(hostCard.getController()); int multiplier = AllZoneUtil.getTokenDoublersMagnitude(hostCard.getController());
multiplier *= numCopies; multiplier *= numCopies;
Card[] crds = new Card[multiplier]; 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 // TODO - does this need to set
// PlayerZone_ComesIntoPlay.SimultaneousEntry like Rite of Replication // PlayerZone_ComesIntoPlay.SimultaneousEntry like Rite of Replication
// does? // does?