mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
fixed issue 50
This commit is contained in:
parent
8d176bf82b
commit
21fe584e63
1 changed files with 7 additions and 0 deletions
|
@ -32,6 +32,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.Constants.Zone;
|
import mage.Constants.Zone;
|
||||||
|
import mage.abilities.common.ZoneChangeTriggeredAbility;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
import mage.abilities.keyword.ProtectionAbility;
|
import mage.abilities.keyword.ProtectionAbility;
|
||||||
import mage.abilities.mana.ManaAbility;
|
import mage.abilities.mana.ManaAbility;
|
||||||
|
@ -130,6 +131,12 @@ public class AbilitiesImpl<T extends Ability> extends ArrayList<T> implements Ab
|
||||||
if (ability instanceof TriggeredAbility && ability.getZone().match(zone)) {
|
if (ability instanceof TriggeredAbility && ability.getZone().match(zone)) {
|
||||||
zonedAbilities.add((TriggeredAbility)ability);
|
zonedAbilities.add((TriggeredAbility)ability);
|
||||||
}
|
}
|
||||||
|
else if (ability instanceof ZoneChangeTriggeredAbility) {
|
||||||
|
ZoneChangeTriggeredAbility zcAbility = (ZoneChangeTriggeredAbility)ability;
|
||||||
|
if (zcAbility.getToZone() != null && zcAbility.getToZone().match(zone)) {
|
||||||
|
zonedAbilities.add((ZoneChangeTriggeredAbility)ability);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return zonedAbilities;
|
return zonedAbilities;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue