*Added Corpsejack Menace

This commit is contained in:
Hellfish
2012-10-01 22:00:17 +00:00
parent 2324fc200c
commit 56fb6810e3
4 changed files with 17 additions and 4 deletions

1
.gitattributes vendored
View File

@@ -1860,6 +1860,7 @@ res/cardsfolder/c/corpse_harvester.txt svneol=native#text/plain
res/cardsfolder/c/corpse_lunge.txt -text
res/cardsfolder/c/corpse_traders.txt -text
res/cardsfolder/c/corpsehatch.txt svneol=native#text/plain
res/cardsfolder/c/corpsejack_menace.txt -text
res/cardsfolder/c/corpulent_corpse.txt svneol=native#text/plain
res/cardsfolder/c/corrosive_gale.txt svneol=native#text/plain
res/cardsfolder/c/corrosive_mentor.txt svneol=native#text/plain

View File

@@ -0,0 +1,9 @@
Name:Corpsejack Menace
ManaCost:2 B G
Types:Creature Fungus
Text:If one or more +1/+1 counters would be placed on a creature you control, twice that many +1/+1 counters are placed on it instead.
PT:4/4
SVar:Picture:http://www.wizards.com/global/images/magic/general/corpsejack_menace.jpg
SetInfo:RTR|Rare|http://magiccards.info/scans/en/rtr/152.jpg
Oracle:If one or more +1/+1 counters would be placed on a creature you control, twice that many +1/+1 counters are placed on it instead.
End

View File

@@ -332,9 +332,12 @@ public abstract class AllZoneUtil {
* Doubling Season
* @return a int.
*/
public static int getDoublingSeasonMagnitude(final Player player) {
final int doublingSeasons = player.getCardsIn(ZoneType.Battlefield, "Doubling Season").size();
return (int) Math.pow(2, doublingSeasons); // pow(a,0) = 1; pow(a,1) = a
public static int getCounterDoublersMagnitude(final Player player, Counters type) {
int counterDoublers = player.getCardsIn(ZoneType.Battlefield, "Doubling Season").size();
if(type == Counters.P1P1) {
counterDoublers += player.getCardsIn(ZoneType.Battlefield, "Corpsejack Menace").size();
}
return (int) Math.pow(2, counterDoublers); // pow(a,0) = 1; pow(a,1) = a
// ... no worries about size
// = 0
}

View File

@@ -1285,7 +1285,7 @@ public class Card extends GameEntity implements Comparable<Card> {
if (!this.canHaveCountersPlacedOnIt(counterName)) {
return;
}
final int multiplier = AllZoneUtil.getDoublingSeasonMagnitude(this.getController());
final int multiplier = AllZoneUtil.getCounterDoublersMagnitude(this.getController(),counterName);
if (this.counters.containsKey(counterName)) {
final Integer aux = this.counters.get(counterName) + (multiplier * n);
this.counters.put(counterName, aux);