New cards

[CHK] BloodthirstyOgre / HorobiDeathsWail / KumanosPupil / MyojinOfInfiniteRage / MyojinOfLifesWeb / MyojinOfNightsReach / MyojinOfSeeingWinds / OniPossession / PainwrackerOni

Framework
PutOntoBattlefieldTargetEffect - new effect
SetCardSubtypeAttachedEffect - added constuctor with list of types
TargetControlledCreaturePermanent - added constructor with "required" and "filter"
DrawCardControllerEffect / SacrificeTargetEffect - improved text generation
CountersCount - added flag to return the number of counters as negative value
This commit is contained in:
LevelX 2012-01-02 22:30:22 +01:00
parent 182d636078
commit e88a2a199f
16 changed files with 1153 additions and 23 deletions

View file

@ -9,13 +9,20 @@ import mage.game.permanent.Permanent;
public class CountersCount implements DynamicValue {
private CounterType counter;
private boolean negative = false;
public CountersCount(CounterType counter) {
this.counter = counter;
}
public CountersCount(CounterType counter, boolean negative) {
this.counter = counter;
this.negative = negative;
}
public CountersCount(final CountersCount countersCount) {
this.counter = countersCount.counter;
this.negative = countersCount.negative;
}
@Override
@ -26,7 +33,7 @@ public class CountersCount implements DynamicValue {
p = (Permanent) game.getLastKnownInformation(sourceAbility.getSourceId(), Constants.Zone.BATTLEFIELD);
}
if (p != null) {
return p.getCounters().getCount(counter);
return (negative ? p.getCounters().getCount(counter)*-1: p.getCounters().getCount(counter)) ;
}
return 0;
}
@ -38,7 +45,7 @@ public class CountersCount implements DynamicValue {
@Override
public String toString() {
return "1";
return (negative ?"-1":"1");
}
@Override