Add canActivate flag.

This commit is contained in:
Patrick Hulin 2019-12-11 22:15:07 -05:00
parent b0bac1f751
commit f63561cfb7

View file

@ -3219,6 +3219,10 @@ public abstract class PlayerImpl implements Player, Serializable {
List<Ability> playable = new ArrayList();
if (card != null) {
for (ActivatedAbility ability : card.getAbilities().getActivatedAbilities(Zone.HAND)) {
if (!ability.canActivate(playerId, game).canActivate()) {
continue;
}
UUID savedControllerId = null;
if (setControllerId) {
// For when owner != caster, e.g. with Psychic Intrusion and similar effects.