- Added Melira, Sylvok Outcast.

This commit is contained in:
Sloth
2011-09-16 13:09:39 +00:00
parent e72963d00e
commit 39878c3f70
6 changed files with 35 additions and 6 deletions

View File

@@ -822,6 +822,9 @@ public class Card extends GameEntity implements Comparable<Card> {
if (this.hasKeyword("CARDNAME can't have counters placed on it.")) {
return;
}
if (this.hasKeyword("CARDNAME can't have -1/-1 counters placed on it.") && counterName.equals(Counters.M1M1)) {
return;
}
if (counters.containsKey(counterName)) {
Integer aux = counters.get(counterName) + n;
counters.put(counterName, aux);
@@ -882,6 +885,9 @@ public class Card extends GameEntity implements Comparable<Card> {
if (this.hasKeyword("CARDNAME can't have counters placed on it.")) {
return;
}
if (this.hasKeyword("CARDNAME can't have -1/-1 counters placed on it.") && counterName.equals(Counters.M1M1)) {
return;
}
int multiplier = AllZoneUtil.getDoublingSeasonMagnitude(this.getController());
if (counters.containsKey(counterName)) {
Integer aux = counters.get(counterName) + (multiplier * n);
@@ -1013,7 +1019,9 @@ public class Card extends GameEntity implements Comparable<Card> {
if (this.hasKeyword("CARDNAME can't have counters placed on it.")) {
return;
}
if (this.hasKeyword("CARDNAME can't have -1/-1 counters placed on it.") && counterName.equals(Counters.M1M1)) {
return;
}
// sometimes you just need to set the value without being affected by DoublingSeason
if (bSetValue) {
counters.put(counterName, Integer.valueOf(n));

View File

@@ -627,8 +627,10 @@ public abstract class Player extends GameEntity {
* @param num a int.
*/
public void addPoisonCounters(int num) {
poisonCounters += num;
this.updateObservers();
if(!this.hasKeyword("You can't get poison counters")) {
poisonCounters += num;
this.updateObservers();
}
}
/**

View File

@@ -200,7 +200,7 @@ public class AbilityFactory_Counters {
final Card source = sa.getSourceCard();
CardList list;
Card choice = null;
String type = params.get("CounterType");
final String type = params.get("CounterType");
String amountStr = params.get("CounterNum");
Player player = af.isCurse() ? AllZone.getHumanPlayer() : AllZone.getComputerPlayer();
@@ -210,7 +210,8 @@ public class AbilityFactory_Counters {
list = list.filter(new CardListFilter() {
public boolean addCard(final Card c) {
return CardFactoryUtil.canTarget(source, c)
&& !c.hasKeyword("CARDNAME can't have counters placed on it.");
&& !c.hasKeyword("CARDNAME can't have counters placed on it.")
&& !(c.hasKeyword("CARDNAME can't have -1/-1 counters placed on it.") && type.equals("M1M1"));
}
});
@@ -1990,7 +1991,8 @@ public class AbilityFactory_Counters {
if (null != source && null != dest) {
if (source.getCounters(cType) >= amount) {
if (!dest.hasKeyword("CARDNAME can't have counters placed on it.")) {
if (!dest.hasKeyword("CARDNAME can't have counters placed on it.")
&& !(dest.hasKeyword("CARDNAME can't have -1/-1 counters placed on it.") && cType.equals("M1M1"))) {
dest.addCounter(cType, amount);
source.subtractCounter(cType, amount);
}

View File

@@ -52,6 +52,9 @@ public class CostPutCounter extends CostPart {
if(source.hasKeyword("CARDNAME can't have counters placed on it.")) {
return false;
}
if (source.hasKeyword("CARDNAME can't have -1/-1 counters placed on it.") && counter.equals(Counters.M1M1)) {
return false;
}
return true;
}