Fixed a recently committed bug of add counter logic.

This commit is contained in:
LevelX2 2015-03-16 12:06:55 +01:00
parent 1464dc1169
commit 0430cf63aa
2 changed files with 13 additions and 1 deletions

View file

@ -111,6 +111,18 @@ class UmezawasJitteAbility extends TriggeredAbilityImpl {
return new UmezawasJitteAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
switch(event.getType()) {
case DAMAGED_CREATURE:
case DAMAGED_PLANESWALKER:
case DAMAGED_PLAYER:
case COMBAT_DAMAGE_STEP_PRE:
return true;
}
return false;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event instanceof DamagedEvent && !usedInPhase && ((DamagedEvent) event).isCombatDamage()) {

View file

@ -118,7 +118,7 @@ public class AddCountersSourceEffect extends OneShotEffect {
if (counter != null) {
Counter newCounter = counter.copy();
int countersToAdd = amount.calculate(game, source, this);
if (countersToAdd > 0) {
if (amount instanceof StaticValue || countersToAdd > 0) {
if (countersToAdd > 0 && newCounter.getCount() == 1) {
countersToAdd--;
}