mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed a recently committed bug of add counter logic.
This commit is contained in:
parent
1464dc1169
commit
0430cf63aa
2 changed files with 13 additions and 1 deletions
|
@ -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()) {
|
||||
|
|
|
@ -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--;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue