Bloodthirsty Ogre - refactored counter handling for negative values

CountersCount - removed negative parameter
This commit is contained in:
LevelX 2012-01-02 23:25:46 +01:00
parent e88a2a199f
commit 7207bc0be6
2 changed files with 6 additions and 48 deletions

View file

@ -9,20 +9,13 @@ 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
@ -33,7 +26,7 @@ public class CountersCount implements DynamicValue {
p = (Permanent) game.getLastKnownInformation(sourceAbility.getSourceId(), Constants.Zone.BATTLEFIELD);
}
if (p != null) {
return (negative ? p.getCounters().getCount(counter)*-1: p.getCounters().getCount(counter)) ;
return p.getCounters().getCount(counter);
}
return 0;
}
@ -45,7 +38,7 @@ public class CountersCount implements DynamicValue {
@Override
public String toString() {
return (negative ?"-1":"1");
return "1";
}
@Override